After months of quiet talks with European leaders, who generally want Britain to stay but are resistant to any changes to the bloc’s main principles, Mr. Cameron is hoping to get the basics of a deal done at the next European Union summit meeting in mid-December, or failing that, at an emergency summit meeting early next year. His aides say he does not want to drag out the referendum, with some suggesting that he would prefer to have it before what could be another chaotic summer of migrant flows to Europe. The handling of that issue has already undermined the reputation of the European Union in British eyes.

Mr. Cameron’s demands included a safeguard to prevent countries that use the euro from discriminating economically against Britain, which has retained the pound, and an end to Britain’s legal commitment, as a signatory to European Union treaties, to pursue an “ever closer union,” which conservatives see as a threat to national sovereignty. He also called for a reduction in regulatory red tape as a way of improving economic competitiveness.

Crucially, he said that Britain should have the right to restrict welfare entitlements, including benefits for low-income workers, for four years for migrants arriving from other European countries. That is widely regarded as his most difficult demand because it would be a departure from current European rules stipulating that citizens of all countries in the bloc should be treated equally — a point made by European officials on Tuesday.

Mr. Cameron has made clear that he wants a deal that will allow Britain to stay, but in an effort to retain negotiating leverage and credibility with the anti-European right wing of his Conservative Party, he has also signaled that he is willing to walk away if necessary and that he believes that Britain could do just fine on its own if the union does not grant him what he wants. The British public remains roughly split on the merits of membership in the bloc, according to opinion polls.

Mark Leonard, director of the European Council on Foreign Relations, a research institute, said Mr. Cameron was striking a tricky balance.