Both men made their announcements on Twitter (Cameron,Tusk) as leaders at a summit dinner reviewed an amended text that resolved outstanding disputes over welfare benefits for migrant workers from other EU countries and safeguards for Britain's financial services sector from euro zone regulation.

"Deal. Unanimous support for new settlement for #UKinEU," Tusk's message said.

The agreement delivered victory to Cameron on several of the key demands on which he chose to fight for what he called "a new settlement" with Europe.

He won a commitment to change the bloc's governing treaties in the future to recognize that Britain was not bound to any political union, and would have safeguards against financial regulation being imposed on the City of London by the euro zone.

Cameron earlier postponed a planned cabinet meeting to stay on in Brussels and work for a deal he can sell to skeptical voters, who are almost evenly split over whether to stay in the EU, according to opinion polls.

After all-night negotiations followed by a long day of private meetings to try to whittle down remaining differences, Tusk and European Commission President Jean-Claude Juncker put an amended clean text on the dinner table and the leaders quickly indicated their acceptance.

Earlier, a plenary session to review progress was postponed several times — from a late "English breakfast" to an "English lunch" and again till dinner at 8 p.m. (1900 GMT) — and leaders were asked to book hotel rooms for an extra night in Brussels.

Facing an uphill political battle at home, Cameron was concerned to show Britons that he had won concessions that he believes can reduce an influx of EU migrant workers and keep Britain out of any future political integration.

In hours of wrangling with central and east European countries that provide many of Britain's low-paid immigrant workers, he secured the right to curb in-work benefits for up to four years and scale back child benefit for workers whose children remain abroad.

European Parliament President Martin Schulz, whose assembly will have to pass legislation to implement concessions to Britain on benefit curbs, criticized some countries for trying to link demands on Europe's refugee crisis to the British deal.

He appeared to be referring to Greece, which had said it could block the entire deal unless it got its way on a dispute with Slovenia over border controls to curb the flow of migrants.

East European countries sought to restrict Cameron's welfare cuts to new arrivals rather than the more than 1 million European migrant workers already in the United Kingdom. In the end, both sides emerged with something to show for their negotiations.

A compromise that appeared largely favorable to Britain was found for French concerns about differential treatment for London banks outside the euro zone, as well as Belgian grumbles about Britain setting a precedent for states to snub EU integration.