Despite overnight threats that David Davis was going to resign, Ms May and her minister managed to agree a customs plan that prevented a wider fallout after a dramatic day of talks.
The row centres on Mr Davis’s demands for a time-limit on the “backstop” option that would keep the UK in parts of the customs union until a solution is found to the border issue in Northern Ireland.
The prime minister gave way to Brexiteers by making last-minute amendments to the plan, ensuring the backstop does not extend beyond December 2021, which critics say would keep Britain too closely tied to Brussels.
However, a leading EU figure immediately poured cold water over the compromise deal by saying it was “difficult to see” how it could offer a “workable” solution to avoiding a hard border in Ireland.
The document is the UK’s response to an EU proposal to keep Northern Ireland in the customs union after Brexit, which Ms May rejected outright as it would draw a border down the Irish Sea.
In a letter to Tory MPs, she said: “To put it frankly, if we are to make progress in the negotiations and deliver the smooth, orderly and successful Brexit the country wants, we need to agree with the EU the terms of backstop.
“We have a choice between the [European Commission]’s proposal which, however hypothetical, must be unacceptable in principle to anyone who believe in the union of the United Kingdom, and an alternative that is unpalatable but, at worst, temporary.”
The government hopes to have a permanent customs plan in place by the end of 2020, Ms May said, arguing that it was right to have a fallback option in case talks were delayed “for technical reasons”.
The agreement was reached after Ms May held a string of one-on-one meetings with Mr Davis and other top Brexiteers such as Boris Johnson and Liam Fox.
None of the ministers had threatened to resign during the “constructive” meetings, according to a Downing Street spokesperson.
A source close to Mr Davis said: “Obviously, there’s been a back and forth on this paper, as there always is whenever the government publishes anything.
“The backstop paper has been amended and now expresses, in much more detail, the time-limited nature of our proposal – something the prime minister and David Davis have always been committed to.”
The prime minister may have pacified her party for now but she still has to convince EU leaders of the merit of her plans.
Guy Verhofstadt, the European parliament’s Brexit chief, said: “Difficult to see how UK proposal on customs aspects of Northern Ireland backstop will deliver a workable solution to avoid a hard border and respect integrity of the single market/customs union.
“A backstop that is temporary is not a backstop, unless the definitive arrangement is the same as the backstop.”
Senior figures at the European Commission are now considering the plans, with chief negotiator Michel Barnier saying the plan must the integrity of the single market and offer a “workable solution” to the border row of an “all-weather” character.
However, Ireland’s deputy prime minister Simon Coveney warned that there could be no progress on other elements of the Brexit talks without legally binding assurance that a hard border would be avoided “in all circumstances”.
“Ireland and the commission have both stressed that substantial progress on the backstop is needed before the June European Council,” said Mr Coveney.
“Clearly, a great deal of work remains to be done and this needs to be the highest priority for all sides in the weeks ahead.”
Pro-EU Labour MP Rupa Huq said: “Theresa May is right to say that Brexit is turning into a choice between the ‘unacceptable’ and the ‘unpalatable’, but that should come as no surprise.
“The Brexit that was promised simply cannot be delivered. We now know that every form of Brexit will damage our country and threaten jobs and livelihoods, and even the prime minister is now admitting we are heading for a terrible deal.”
Meanwhile, one of Boris Johnson’s ministers provoked fresh controversy when he suggested a second EU referendum on the final Brexit deal would be “possible”.
Sir Alan Duncan told an audience in Berlin that voters would not be allowed to reverse the original decision to leave the EU but they would get “the choice would be between the exit deal on offer or having no deal at all”.
It comes as MPs gear up for weeks of parliamentary warfare over preparations for leaving the EU, as it was announced that two key Brexit bills will return to the Commons.
Cabinet minister Andrea Leadsom revealed that the long-delayed trade and customs bills will both be debated by MPs in mid-July, following speculation the government has kicked the vital legislation into the long grass over fears of conflict with pro-EU rebels.
Her announcement came ahead of next week’s Commons showdown over Ms May’s flagship Brexit legislation – the EU (Withdrawal) Bill – where ministers will seek to overturn all 15 Lords defeats during a fraught two-day contest.
Join our commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies