David Cameron, UK prime minister, has announced that a deal brokered with European Union leaders in advance of a membership referendum would give Britain "special status" in the bloc.
Britain is already the EU's most semi-detached member, having opted out of joining the euro single currency, the Schengen zone of passport-free travel and many areas of police and judicial cooperation
"I have negotiated a deal to give the UK special status in the EU," Cameron said on Twitter, before making a public announcement on Friday saying that Britain will not be part of a common European currency or a future European "superstate".
"Britain will never join the euro. And we've secured vital protections for our economy and a full say over the rules of the free trade single market while remaining outside the euro," he said.
Cameron also said there will be "tough new restrictions on access" to its welfare system for EU refugees and migrants, noting that Britain has secured an "emergency brake" which, once activated, can be applied for seven years to restrict access to British in-work benefits.
After all-night negotiations in Brussels followed by a day of private meetings to try to narrow remaining differences, Cameron announced the deal late into the night on Friday.
Many leaders said they felt they were at a historic turning point for European integration.
No country has ever voted to leave the Union.
Britain is the EU's second-largest economy and one of its two permanent members on the UN Security Council.
Its exit would have ended the vision of the EU as the natural home for European democracies and reverse the continent's post-World War II march towards "ever closer union".
Source: Al Jazeera and agencies