After all of the marathon debate and discussion here at the European Council in Brussels, finally Britain has sealed a deal on its EU reform demands.
It is a deal Prime Minister David Cameron is hailing and eurosceptics are dismissing.
But what exactly is in the agreement? And what does it mean for the future of Britain’s relationship with the European Union?
The deal delivers victory to Cameron on several key demands – changes he says make up a “new settlement” with Europe.
The deal includes an “emergency brake” on in-work benefits for EU migrants for up to four years, when there’s an exceptional influx.
Eastern European countries, who had wrangled over the welfare demands, were only partially successful in restricting cuts to new arrivals rather than European migrant workers already in the UK.
The Visegrad group – made of Poland, Hungary, Slovakia and the Czech Republic – say the deal reflects their key demands.
Cameron also won a commitment that there would be safeguards against financial regulation being imposed on the City of London by the euro zone.
In a victory over France, which had concerns about fairness, just one country would be enough to pull an emergency “brake” on eurozone issues.
The legally-binding agreement in Brussels also grants Britain an explicit exemption from the founding goal of “ever closer union.”
Belgium, concerned about a precedent being set for states to snub EU integration, secured a so-called “self destruct” clause – whereby the whole deal would be void if Britain votes to leave the EU.
Giving national parliaments more powers to block legislation, through a so-called “red card” system, is also acknowledged in the deal.
Cameron will use the deal to campaign for Britain to stay in the EU in a membership referendum. And only if the outcome is to stay will the key elements of the deal begin a long process of securing final implementation.
Polls show that voters have been split over whether Britain should stay or go.