British Prime Minister David Cameron on Friday sealed a deal for "special status" in the European Union after a marathon summit, paving the way for him to campaign to stay in the bloc in a historic referendum.
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 today as he embarks on the difficult process of selling the deal at home ahead of the referendum, expected on 23 June.
"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".
While Britain's place in the EU now rests in the hands of the British public, the deal removes one major headache for the bloc as it faces the biggest migration crisis in Europe's history.
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".
"I do not think that we gave too much to Great Britain," she said.
French President Francois Hollande, meanwhile, insisted that the British deal contained "no exceptions to the rules" of the EU.
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-sceptic 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 today's editions focussed 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-sceptic 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 today, the referendum campaign will whirr into life as ministers in Cameron's government 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 emphasise the risks of either leaving or sticking with the status quo.
"This is going to be a depressingly negative campaign," he told AFP.
No veto power
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 just over 67 per cent. However, that failed to prevent years of divisive quarrelling about Britain's role in the bloc and its wider place in the world.
It was this, fuelled by a surge in support for the anti-EU UK Independence Party led by Nigel Farage, which first prompted Cameron to promise a referendum in 2013. (See: Cameron, EU leaders brainstorm through night over Brexit)