At 11am last Tuesday a group of senior Tory MPs opposed to a no-deal Brexit gathered outside the cabinet room at No 10 for a meeting with the prime minister. The former chancellor Philip Hammond, the ex-justice secretary David Gauke and the former business secretary Greg Clark were among them. Along with other Tory MPs, including Sir Oliver Letwin and Dominic Grieve, and Labour’s Keir Starmer and Hilary Benn, they had spent their summer holidays drawing up a bill they believed would force Boris Johnson to seek an extension to Brexit if he could not strike a new deal with the EU by mid-October.

Johnson had insisted before and since becoming prime minister that he would never ask the EU for another postponement and would take the UK out of the EU on 31 October “deal or no deal”, “do or die”. To limit the amount of parliamentary time the rebels would have to pass the bill, the prime minister had already announced he would shut parliament down for five weeks from next week ahead of a new Queen’s speech on 14 October. But the cross-party alliance opposed to no deal had moved fast in response, and accelerated their plans. As they chatted before the meeting, they were confident they had both the numbers to get the bill on the statute book and the time to do so before parliament was closed.

Outside in Whitehall, and down the road in Parliament Square, a constant din of protest and counter-protest rang out from Remainers and Leavers alike. It was parliament’s first day back after the long July and August recess – and the controversial prorogation announcement. Police had separated people on different sides of the Brexit divide as best they could but still arguments broke out between them on the pavement. Remainers chanted “stop the coup” while Leavers carried banners saying “Traitor Parliament” and “Boris. No Deal is Ideal”. Opposite the entrance to the Commons one of the protesters, Dr John Dinnen, said he had woken up at 2am so worried about what Brexit would mean for peace on the island of Ireland, where he was born, that he had decided to get a train from Hereford to protest about a possible no deal. “I feel very strongly about it,” he said.

When the No 10 meeting got under way, the former Tory ministers – members of the so-called Gaukeward Squad – asked Johnson what proposals he had to break the deadlock with Brussels and secure a new agreement to stop the UK crashing out in less than two months’ time. If he really had such a plan, and it proved acceptable to the EU and parliament, they made clear that their efforts to force him to go to Brussels to ask for another delay would be unnecessary and everyone would be happy.

“He had a folder on the desk with him and pointed at it, suggesting the plans were inside,” said one source at the meeting. The MPs then inquired whether the folder’s contents had been presented to EU leaders. “His response was that the EU would only really begin negotiating in earnest when it was sure the UK was serious about no deal,” said another source. “And the PM was clear the EU was not yet sure that we were serious about no deal so nothing had been sent to them yet.”

The message Johnson wanted to convey was that the MPs’ attempts to block no deal were taking the heat off Brussels. During an hour of discussions, Clark asked for some specific details on particular issues and Johnson said someone from his office would get back to him. Later that day, Clark received a phone call from Johnson’s closest aide, Dominic Cummings, which failed to provide answers. Instead Clark found himself on the end of a foul-mouthed tirade.

According to sources aware of the exchange, Cummings bawled at him, saying: “When are you MPs going to realise that we are leaving on 31 October?” before adding: “We are going to fucking purge you.”

Boris Johnson speaking in the House of Commons for the first time on Tuesday. Photograph: Jessica Taylor/AP

Just a few hours after the meeting, Johnson made his first speech in the chamber as prime minister. Reporting on the G7 summit in Biarritz, he struck a different tone about the Brexit talks. “It is simply not true to say we are not making progress,” he said. “I returned from the G7 with real momentum in the Brexit discussions.” This ran contrary not only to the impression he had given to rebel MPs earlier, but also to a report that day in the Daily Telegraph which had quoted Cummings as having admitted in a private meeting that negotiations with the EU were “a sham”.

As Johnson spoke, the Tory MP Phillip Lee, a Remainer, crossed the floor of the house to join the Liberal Democrats on the opposition benches. In an instant Johnson had lost his majority; his ability to govern was draining away. Lee and the rebels could see that the Prime Minister was putting out one set of messages in private and another in public. “The only conclusion to be drawn was that he was actually planning for No Deal,” said one of the rebels. Lee wrote in his resignation letter that Brexit had transformed the Conservative party into a “narrow faction” that had “increasingly become infected with the twin diseases of populism and English nationalism”.

Later, during a debate that evening on the rebel plan to take control of parliamentary business, the leader of the Commons, Jacob-Rees Mogg, reclined on the government frontbench. The image went viral within minutes. He was accused of being “contemptuous of this house” by the Green MP Caroline Lucas.

The photo of Jacob Rees-Mogg relaxing on the front benches rapidly went viral. Photograph: AFP/Getty Images

When the result of the vote on the Tory rebel plan was announced, the opposition benches erupted while Tory Remainers tried to control their glee. The government had lost by 328 to 301 votes. Twenty-one Conservative MPs had defied their party by voting to allow debate on a bill that would force their own prime minister to ask the EU for an extension – which he had promised over and over again never to do.

As MPs left the chamber, the purge Cummings had threatened began. All rebel MPs, including the father of the house, Kenneth Clarke, and Sir Nicholas Soames, the grandson of Winston Churchill, had the whip withdrawn, and were told they would not be allowed to stand as Conservatives at the next election. The veteran Tory MP Roger Gale said Johnson was “in danger of tearing the party apart” and rumours spread that cabinet ministers, including Amber Rudd, were seething and considering how long they could remain in the government.

It was clear by the evening that part one of the Johnson/Cummings masterplan - to use prorogation coupled with threats - had not only failed spectacularly but had backfired. One of those who were purged, the former foreign office minister Alistair Burt says: “I have never seen a government strategy so misjudged, nor fail so speedily, as that devised in Downing Street since late July.”

The treatment of grandees such as Clarke and Soames had upset Tory MPs of all Brexit persuasions, even some of the most committed Leavers, such as Sir Edward Leigh, who voiced his disquiet at a meeting of the 1922 Committee of Tory backbenchers. The rebels said the behaviour of No 10 was swelling their numbers, not reducing them so had been utterly counter-productive as well as deeply divisive.

On the Tory benches on Wednesday – a day No 10 had set aside for Sajid Javid’s spending review, with its many promises to increase funding of public services – purged MPs rose one after another to decry the gradual disintegration of a once-tolerant and internationalist Conservative party.

There was defiance and dark humour. Soames was emotional and scathing in turns, saying he was sad his long career as a Conservative MP was ending in this way, before noting that Johnson’s “serial disloyalty” in the past “had been such an inspiration to many of us”. Burt asked “if we are being purged now, who is next?” and vowed that the anti-EU obsessions his party had developed “may have curtailed my future but it will not rob me of what I believe. I will walk out of here looking up at the sky, not at my shoes.”

That evening’s first vote on the “Benn bill” passed at 7pm by 327 and 299. Barring problems in the Lords it was heading on to the statute book.

On only the second day of parliamentary business under Johnson’s premiership he had suffered two defeats and lost his majority. Ian Blackford, leader of the SNP at Westminster, observed that “this must be the shortest-lived honeymoon in parliamentary history”.

Incredibly, some Conservatives went further, predicting that Johnson was cornered and could be finished as PM. He had promised never to extend the Brexit deadline but had failed to stop a new law being passed that was about to force him to do so. “I don’t like to say this, and I hardly dare, but I think it could be checkmate,” said one of the leading Tory rebels.

He was right to be cautious. Johnson, Cummings, and No 10’s head of legislative affairs, Nikki da Costa, might not have succeeded yet, but they had another scheme up their sleeves which they believed would still scupper the rebel plans.

At 7.51pm on Wednesday, Johnson rose in the Commons to move a motion “that there shall be an early general election” on 15 October. If parliament were to vote in favour in sufficient numbers, and the Tories were to win the election with a big enough majority, Johnson could then repeal the Benn bill and avoid having to ask for an extension. The pressure, it seemed, was on the Labour leader Jeremy Corbyn.

Johnson told MPs it would be unthinkable for the Labour party leader to refuse a chance to go to the country. “He has demanded an election for two years while blocking Brexit. He said only two days ago that he would support an election...is he now going to say the public cannot be allowed an election to decide which of us sorts out this mess?” Labour and the other opposition parties, including the SNP, had, however, agreed their lines. They would back a general election – but not on Johnson’s terms and not on 15 October.

Instead they would vote against the motion and say an election should be called when the Benn bill had received royal assent or, better still, when Johnson had actually asked the EU for an extension. Corbyn responded to the election call with mockery. “The offer of the election today is a bit like the offer of an apple to Snow White from the Wicked Queen, because what the Prime Minister is offering is not an apple or even an election, but the poison of no deal.”

To force an election, Johnson needed a two-thirds majority of all MPs to back him. But Labour MPs abstained en masse. The result when it came at 9.21pm was 298 in favour and 56 against. The election ploy had failed, Johnson had lost again, and everyone wondered what on earth he could do next. In the early hours of the next day – Thursday – exhausted peers who were opposed to the Benn bill gave up their attempts at filibustering in the House of Lords and the last hurdle in the way of the Benn bill had been cleared. It is expected to gain royal assent early this week.

The headlines in the Tory-supporting papers tore into Corbyn. The Daily Mail declared: “Corbyn chickens out of an election”. But it was the prime minister who was in far deeper trouble. And things were to get worse. Shortly after 11pm, the prime minister’s brother Jo, a Remainer, resigned from the cabinet, saying he had been “torn between family loyalty and the national interest”.

Johnson speaking in West Yorkshire on Thursday; he was criticised for using police cadets for political purposes. Photograph: Reuters

On a visit to Morley, in West Yorkshire, the prime minister was harangued in front of TV cameras by residents, with one accusing him of “playing games” when he “should be in Brussels negotiating”, and another telling him: “Please leave my town”. On the same trip north he gave speech in Wakefield, with rows of police cadets lined up behind, declaring that he would rather “die in a ditch” than ask for an extension to the UK’s EU membership. The decision to use police cadets for political purposes was widely criticised as senior Tories, including some in the Cabinet, called for a change of strategy. At a dinner that night, the former Conservative prime minister John Major called on Johnson to “get rid” of Cummings and reinstate the MPs he had suspended, without whom “we will cease to be a broad-based national party, and be seen as a mean-minded sect”.

This weekend, Johnson and his advisers suffered another blow: Amber Rudd quit as work and pensions secretary and resigned the Tory whip. She cited the same concerns that Gauke’s rebels had raised, that she no longer believed Johnson wanted to get a deal with the EU. His decision to withdraw the whip from the 21 rebels was “an assault on decency and democracy”.

Amber Rudd resigned as work and pensions secretary and quit the Tory whip on Saturday. Photograph: AFP/Getty Images

They are desperate to find ways to trigger a general election in which they can attack Labour and the other opposition parties for blocking the “will of the people”. Polls this weekend, including the latest Opinium survey for the Observer, showing a 10-point lead for the Conservatives, will encourage them to hang on and fight.

No 10 insists that the prime minister will neither resign nor ask for an extension to Brexit. But doing neither would mean Johnson being in contempt of court and having to quit, say lawyers.

There are suggestions that he will try on Monday to call a vote of no confidence in his own government in an attempt to force a general election, and ask Tory MPs to back that motion. But would the speaker, John Bercow, allow such a move that was clearly aimed at achieving a purpose other than that stated in the motion itself? Another idea floated by sources close to Johnson yesterday was that he would try to force the EU to expel the UK by refusing to nominate a commissioner, a ploy Downing Street seems to think would bring the EU to its knees – but which Brussels insists would not work.

After a week of such drama culminating in Rudd’s resignation, MPs have no idea what will unfold next. “We just have to wait and see what the latest genius plans are from No 10,” said a senior Labour figure. “If they are as disastrous as those they tried over the last few days, I don’t see how he can survive.

“But what do I know? What does anyone know?”