Prime Minister David Cameron hailed on Friday a landmark special status deal for Britain in the EU, and pledged to campaign heart and soul to stay in the block in a historic referendum scheduled for June.
The unanimous agreement came after two days and nights of intense negotiations in Brussels, despite European leaders digging in their heels on all the major reforms Cameron sought.
The British premier will hold an emergency cabinet meeting on Saturday as he embarks on the difficult process of selling the deal at home ahead of the referendum, expected on June 23.
I've negotiated a deal to give the UK special status in the European Union, Cameron told a press conference. I will be campaigning with all my heart and soul to persuade the British people to remain in the reformed European Union that we have secured today.
He said the deal contained a seven-year emergency brake on welfare payments for EU migrants and meant Britain would be permanently out of ever closer union.
EU president Donald Tusk -- the man who brokered the deal -- said the unanimous agreement strengthens Britain's special status in the EU and was legally binding and irreversible.
German Chancellor Angela Merkel, Europe's most powerful leader, said the accord was a fair compromise, adding that I do not think that we gave too much to Great Britain.
French President Francois Hollande, meanwhile, insisted that the British deal contained no exceptions to the rules of the EU. And Lithuanian President Dalia Grybauskaite, the first to break the news of the agreement, tweeted: Drama over.
Yet the drama is only just beginning for Cameron, as he battles Euro-skeptic members of his own Conservative Party and a hostile popular media.
Britain's newspapers went to press shortly before the deal was officially announced, and most of Saturday's editions focused on the expected announcement that Cameron's long-time ally Michael Gove was to support a Brexit.
The Guardian, Daily Telegraph, and Independent all carried front-page pictures of the former education secretary while the Euro-skeptic Daily Express ran with headline: Gove to lead us out of EU.
Cameron will fly back to London where, after a cabinet meeting at 1000 GMT on Saturday, the referendum campaign will whirr into life as ministers who want Britain to leave will be allowed to speak out for the first time.
Opinion polls suggest the British public is finely balanced on whether to back a Brexit.
Anand Menon, professor of European politics at King's College London, said he expected both sides to emphasize the risks of either leaving or sticking with the status quo. This is going to be a depressingly negative campaign.
During negotiations, France and Belgium strongly resisted safeguards for countries that do not use the Euro, and in an apparent win for them, Juncker said the deal would give Britain no power of veto over the Euro-zone.
Britain and other euro-outs will, however, be able to raise concerns about Euro zone policies to the level of EU summits.
Meanwhile, Eastern European countries dug in their heels over benefit payments to EU migrants that they deemed discriminatory and violated the bloc's principle of freedom of movement.
Brussels offered an emergency brake which Britain could invoke for seven years limited period if its welfare system is overwhelmed by the inflow of workers. During that period it can limit the welfare benefits individuals receive for up to four years.
With the EU negotiation out of the way, Cameron now faces fresh political headaches at home as key allies including London Mayor Boris Johnson make up their minds whether to back the prime minister or throw in their lot with the 'No' camp.
On Monday, Cameron's government is expected to table measures in the Houses of Parliament to set the date of the vote.
This will be Britain's second referendum on European membership in just over 30 years -- in June 1975, voters backed membership of the then European Economic Community (EEC) by over 67%.