It was on Friday, during the marathon 12-hour Brexit summit at the PM's Chequers country house, that David Davis realised it was time to resign.
"He presented a strong argument to Cabinet and understood that if he lost that argument and didn't believe in the policy, the natural thing was to step aside," a friend told HuffPost.
Davis wanted to chat through his decision with his wife and his local Conservative Association in his Yorkshire constituency, which he duly did. Having made his mind up, Davis then went to Silverstone race track for the British Grand Prix.
The fact that a German driver won, rather than Britain's Lewis Hamilton, seemed like a neat metaphor for the way May's "soft" Brexit was heading. The outgoing Brexit Secretary felt May's plans were not just unworkable but they would lead to Brussels demanding even more concessions.
He even left the decision late to miss the newspapers front pages, so as not to damage Theresa May Westminster source
Back in London, Davis left his Pimlico home and headed to No. 10 on Sunday night. Over a drink, the Prime Minister's communications chief, Robbie Gibb, tried to talk him out of quitting. Chief Whip Julian Smith also tried in vain to get him to change his mind.
It didn't work. Davis then rang May personally at home in her Maidenhead constituency, announcing that he was indeed resigning. Almost exactly two years since he was brought back from the political wilderness by Theresa May after David Cameron's resignation over the EU referendum result, he was gone again.
Back in July 2016, he sat across the Cabinet table and told May he would make it the mission of his "last job" in government to make her premiership a success. He was keen to reassure her that he had no leadership ambitions of his own. Fast forward to today and he's suddenly presented May with the most serious threat to her political career since she became PM.
Davis decided to make his announcement late on Sunday night, to try to remove any personal animus from the decision. "To be fair, he's been loyal and supportive. He even left the decision late to miss the newspapers front pages, so as not to damage her egregiously," one ally said. But No. 10 knew the damage would be done whenever he timed it, and his resignation has fuelled intense speculation that yet more backbench MPs will submit letters demanding a vote of no confidence in May.
The Final Straw
Ever since May lost her Commons majority in the botched snap election last year, she has steadily moved away from her original vision of a hard Brexit – and Davis, her Brexit Secretary, has felt increasingly sidelined.
Jokes were rife at Westminster that Davis was a "bottler" who serially threatened resignation, only to back off at the last minute. Last December, he was said to be ready to quit if his friend Damian Green was forced out over pornography allegations.
In March, he was reported to be ready to walk if May sold out Britain's fishermen in her EU deal. In April, he was so upset with the PM's "new customs partnership" compromise, aligning UK customs with those of the EU, that he again made clear he was ready to quit.
In June, he looked on the brink as he demanded a fixed end-date for the May's "backstop" deal on Northern Ireland. He was talked round after getting a form of wording he wanted.
But what really started the trouble was when May appeared to undermine Davis last September by taking his key official, Olly Robbins, from his department and making him report directly to her instead.
Robbins first floated this idea of a new customs compromise back in February, days before another crunch Chequers summit. Davis successfully blocked the idea, pointing out it would weaken the UK's negotiating hand, only to see it resurrected this week.
Davis made clear to the PM last Monday that he was "not happy" at leaks that she was to revive the soft Brexit option. Incredibly, he first found out about the details of the new scheme on Tuesday afternoon, after the BBC had been briefed on them for that morning's Today programme.
"There's an important constitutional point here," one ally said. "An unelected civil servant has been used to bypass the party, Parliament and the Cabinet strategy and negotiations committee. The Cabinet Office 'Europe Unit' seems to be running the show. Even Tony Blair at least paid lip service to Cabinet Government.
The source continued: "We had a situation where the Foreign Secretary was only given a big thick folder on the Brexit white paper on 2pm, the day before the Chequers meeting to discuss it."
The compromise plan, known as a Facilitated Customs Arrangement, was dubbed by one Brexiteer "FCA, or fucker for short".
Checkmate at Chequers
The morning of the Chequers meeting, No. 10 insiders were briefing that any minister who wished to quit would have to get a taxi home. Davis's chief-of-staff, Stewart Jackson, dismissed reports that that such hardball tactics contributed to his decision to resign as "unadulterated bollocks".
Davis himself said on the BBC's Today programme that he didn't want to "do a Michael Heseltine" and flounce out of a Cabinet meeting to resign. But the bullish mood from May's aides certainly crystallised in Davis's mind that the PM would not budge. He revealed he started the Chequers meeting by saying "Prime Minister, you know I'm going to be the odd one out on this", before largely staying quiet through the day.
For some time, Brexiteer MPs have feared being outmanoeuvred. Since the election, May has conceded on Remainer demands for a status quo transition period to the end of 2020; she has conceded on payments to the EU and on trade alignment to keep Northern Ireland an integral part of the UK. Not for nothing did some Eurosceptic backbenchers think they were the "boiling frog", as Remainers like Philip Hammond slowly turned up the heat, killing their ambitions for a clean Brexit without them knowing.
May has always been careful to take Brexiteers like Iain Duncan Smith with her, even briefing him before her Mansion House speech earlier this year. But in recent days she and her team seem to have come to a realisation that they needed to ram through the plan and face down both the Cabinet dissenters and backbenchers.
At heart of the row is the idea that May's Brexit plan will not deliver on Vote Leave's referendum promises to "take back control" from Brussels.
Parliament would be given the final say on any move to deviate from plans to align with the EU on trade, but Brexiteers felt this was a move to bounce MPs into an impossible choice: accept this, or accept that jobs will suffer.
Davis's resignation letter, and his Today programme interview, stressed that he felt this "supposed control by Parliament" was "illusory rather than real".
We are giving too much away and too easily David Davis
He fears that the new customs plan could mean EU officials inspecting not just the UK's borders, but also trade within the UK too. Disputes mechanisms would give the European Court of Justice too much of a role and ultimately the whole thing was so complex that Brussels was likely to say the two real options were a "no deal" Brexit or a Norway-style membership of the European Economic Area.
Perhaps the most difficult thing for May is that while Brussels may budge in some areas, Davis could turn out to be right. The EU has long warned it would not allow a "cake and eat it" Brexit that "cherry picks" its longstanding rules on free movement, markets and trade.
Davis summed this up this morning by saying: "My fear is that they will take what we've offered and demand more... We are giving too much away and too easily. Hopefully we will resist any further concessions...
"Perhaps one side effect of my departure is to persuade the government not to make further concessions."
Polling in coming days will prove crucial. Will Leave voters think May's deal, if they even understand it or have heard of it, is a "sell out" of the UK to the EU?
It's possible that Davis could help May because she can now tell Brussels this is her final offer, and that anything else risks bringing down the entire talks. Yet in a curious role reversal, the EU itself may think "no deal is better than a bad deal". That really would be a supreme irony.
Can Theresa May Survive?
When asked if the PM could survive his resignation, Davis told Today: "Oh yes, of course."
That is certainly No. 10's calculation and the market reaction so far has been a collective "meh", with the pound relatively untroubled. However, if other Cabinet ministers were to follow suit, things could spiral quickly out of hand.
Davis insisted "it's not for me to make other people's decisions", but it was obvious that he felt it was now a matter of honour for his former colleagues. "It's very important she finds a Brexit Secretary who believes in this strategy," he said, ominously.
That was a clear signal to Michael Gove and others that they should not take on the post if they still harboured doubts. "I was the one who had to deliver this and would have to deliver something that wasn't workable," Davis added.
Davis is famously a maverick, a loner who surprised even his close friends when he quit as Shadow Home Secretary more than a decade ago to fight a civil liberties by-election. It's a quirk of fate that Theresa May went on to build her career in the job that Davis could have occupied had he not made what many colleagues felt was a quixotic decision back then.
Today, Boris Johnson has a big decision to make – and few expect him to be brave enough to follow Davis. No. 10 calculates he has damaged himself in recent months over Heathrow and other issues, weakening his chance of launching a proper leadership challenge, and that he lacks the necessary support among the 2015 and 2017 intake of new MPs.
On Monday morning, Dominic Raab, previously Minister of State for Housing and Planning, was announced as the replacement for Davis. It was a wise move, given he has is seen by several key Tories as the most likely 'next generation' Brexiteer to be a future leadership contender.
But there's more: the last time Theresa May did something bold and abandoned her instinctive caution was the snap election. Will her bold move to assert her authority on Brexit backfire similarly?
The first rule of politics is to be able to count. And May's team think they have the numbers both within the Cabinet, the Tory Parliamentary party and Parliament as a whole for her compromise plan. Davis admitted today that the Brexiteers were outnumbered in Chequers by "two or three to one".
Jacob Rees-Mogg's European Research Group has about 80 members out of the 316 Tory MPs overall. Of that 80, around 40 may be upset enough to agree with Davis. If they wanted a leadership challenge, they could certainly trigger one under Tory rules (15% of MPs, or 48, letters are required).
There will be huge pressure on Tory MPs to stay loyal as talks with Brussels are running out of time. Some Brexiteers would prefer to get rid of May after we quit the EU next March and fight for a tougher deal. Their hand looks like it has been forced. Labour will always back a no confidence vote in the hope of a general election.
Downing Street is banking on divisions among Brexiteers, in the knowledge that Davis, Liam Fox, Boris Johnson and Michael Gove all have their differences. "divide and rule" has worked before, it might again.