So what now? What is the next hurdle for the prime minister to clear?
Well, it is simple really – Theresa May just needs a majority of the 650 MPs to vote in favour of her deal when it is put before parliament.
But this will prove anything but simple, and whether she can get enough MPs into the aye lobby is now arguably the biggest question in Brexit politics.
Brexit has left both the Tories and Labour divided between those who support leaving and those who do not, and various nuanced factions in between.
While there are 650 MPs, seven Sinn Fein MPs do not take their Westminster seats and the Speaker and his three deputies do not vote.
So the magic number Theresa May needs to meet or surpass is 320 – ie more than half of 639.
Since the 2017 election, her party has had 315 seats, which leaves them short of a working majority alone but ahead of Labour on 257 and the SNP on 35.
This is why the Tories entered into a ‘confidence and supply’ deal with the Democratic Unionist Party, which has 10 MPs who can take her government over the line.
But she currently faces open revolt from both the DUP and Brexiteer and Remain wings of her party.
The European Research Group, led by Jacob Rees-Mogg, has claimed it has 80 MPs ready to vote against what it sees as May’s capitulation to Brussels.
Opponents suggest the number would be whittled down under a concerted offensive of arm bending by the Tory whips, so it may finally may be considerably less.
The DUP, hardcore Brexiteers, appears to be so opposed to a deal it believes casts Northern Ireland adrift from the rest of the UK that it seems at this stage unlikely they can be reconciled.
And Tory Remain supporters have bridled at the deal, with some saying the customs union gives Brussels too much unaccountable power and others who say it does not go far enough.
Pro-EU rebel Anna Soubry told BBC Radio 4’s Today programme that a customs union had to be accompanied by single market access for the good of trade, saying: ‘If you speak … to British business they will tell you a customs union is important, but so is the regulatory alignment as well. That is what I need to see.’
This means May could need to find up to 100 votes – but perhaps more realistically somewhat less – from elsewhere.
The SNP and the Lib Dems, who have 12 MPs, both support remaining in the EU and are likely to vote against it.
So the prime minister may well need to extend an olive branch to Labour, which also has its own divisions between those like Chuka Umunna who oppose Brexit, those like Caroline Flint who support it reluctantly because their constituents voted to leave, or those like Kate Hoey who are ardent Brexiteers.
Jeremy Corbyn’s frontbench position is that they will not support a deal that does not meet its six tests, which include safeguarding worker and consumer rights and providing the ‘exact same benefits’ as membership of the customs union and single market.
Shadow business secretary Rebecca Long-Bailey told the BBC’s Today programme the proposal was ‘unlikely to be a good deal for the country’, saying it wanted to see a permanent rather than temporary customs union.
The question is how many of Corbyn’s MPs are prepared to defy him and support the Prime Minister, reasoning that a no-deal Brexit, which they fear could bring about an economic disaster, would be a worse outcome.