Boris Johnson is facing court action after sending two letters to Brussels – one an unsigned message relaying parliament’s request for an extension to the Brexit process, and the second a personal note advising against any delay.

The move followed a humiliating reverse for the prime minister in the House of Commons, where MPs dramatically voted to withhold approval for the EU withdrawal deal which he struck last week with leaders of the remaining 27 member states.

It came as up to 1 million voters marched through the streets of London to demand a confirmatory referendum on any Brexit deal, in a giant People’s Vote march and rally supported by The Independent’s Final Say campaign.

The prime minister’s defeat by a margin of 322 votes to 306 meant he forfeited the opportunity to stage a vote on his Brexit deal and was instead forced by law to send a letter to Brussels seeking an extension of the Article 50 process beyond his deadline of 31 October.

The stunning result was greeted with a roar of delight from tens of thousands of protesters who crammed into Parliament Square for the rally which concluded the giant march under the banner Together for the Final Say march.

But Mr Johnson remained defiant, issuing a “my deal or no deal” challenge to MPs who are expected to be asked within the next two days to vote once more on his Brexit deal.

Mr Johnson’s twin letters were branded “pathetic” by SNP MP Joanna Cherry, who said she would go to Scotland’s highest court on Monday to test whether they complied with the spirit and the letter of the Benn Act, which required the PM to seek an extension if he could not secure parliamentary approval for his deal by the end of Saturday.

Ms Cherry, who led a successful legal challenge to the PM’s unlawful five-week suspension of parliament, said Mr Johnson had given assurances to Edinburgh’s Court of Session that he would comply with the Act and not seek to frustrate it.

“Looks like he’s breaking both promises,” she said. “Fortunately, no need to raise new proceedings – our existing case is back in court on Monday.”

The court is due on Monday to resume its hearing of Ms Cherry’s application for an order requiring the PM to meet the prescriptions of the Act and to appoint an official to send the letter to Brussels in the correct form if the PM refuses to. Commons speaker John Bercow told her he was ready to sign the letter in Johnson’s place if the court instructed him to.

The first letter – sent not by the PM, but by the UK’s permanent representative in Brussels Sir Tim Barrow – simply copied the text of the extension request stipulated in the Benn Act. Although it bore the salutation “Yours Sincerely, Prime Minister of the United Kingdom of Great Britain and Northern Ireland”, it carried no signature.

The second letter, signed by Mr Johnson, stated that he remains “confident” of securing MPs’ backing for the last-minute accord he struck with leaders of the remaining 27 EU states last Thursday.

And he said: “While it is open to the European Council to accede to the request mandated by parliament or to offer an alternative extension period, I have made clear since becoming prime minister – and made clear to parliament again today – my view, and the government’s position, that a further extension would damage the interests of the UK and our EU partners and the relationship between us.

“We must bring this process to a conclusion so that we can move to the next phase and build our new relationship.”

In an apparent hint to Brussels to take its time over responding, Mr Johnson said he recognised that a new summit of EU leaders may be needed to consider the extension response, and said that he would be happy to attend to answer questions.

But Mr Tusk appeared to indicate that he would act swiftly, announcing on Twitter: “The extension request has just arrived. I will now start consulting EU leaders on how to react.”

Downing Street said it believed the letters fulfilled the PM’s duties under the provisions of the Benn Act.

Mr Johnson warned MPs in a separate letter that the EU may reject the extension request, or reply too late for them to be sure by the time they vote on Monday or Tuesday that defeat for his withdrawal agreement would not result in the UK crashing out without a deal at the end of the month.

It is thought that Downing Street is confident it can secure a majority for the deal within the next few days – either in a fresh “meaningful vote” or at second reading of the Withdrawal Agreement Bill which must be passed to ratify

Mr Johnson was buoyed by the fact that the “Spartan” Brexit hardliners of the European Research Group, who three times voted down Theresa May’s deal, backed him in Saturday’s division.

But he won the support of only six Labour MPs, while four others abstained, suggesting he may not be able to hope for any more votes from that quarter. And the fatal blow was delivered by the Tories’ allies the Democratic Unionist Party, all 10 of whose MPs voted against the government despite a last-ditch plea from Johnson to their Westminster leader Nigel Dodds.

Party sources played down speculation that the DUP might be ready to throw their weight behind a second referendum, sparked when Mr Dodds told the Commons: “We will examine all amendments in the light of our overriding concern about the constitutional and economic integrity of the Union. That is our priority.”

Senior Labour figures including shadow chancellor John McDonnell joined speakers from across the political spectrum at the People’s Vote rally, in a clear indication of the party’s growing commitment to a public vote on a Brexit deal.

Declaring that Labour – despite the absence from the march of its leader Jeremy Corbyn – is a Remain party, Mr McDonnell said: “We believe that our future best lies within the European Union itself.”

In dramatic scenes during the first Saturday sitting of parliament since the Falklands War, Mr Johnson’s hopes to gain the Commons’ backing for his Brexit plan were scuppered by an amendment tabled by former Conservative cabinet minister Sir Oliver Letwin, who he last month expelled from the party over a previous Brexit rebellion.

Despite saying he wanted to see Mr Johnson’s deal succeed, Sir Oliver pushed through a provision withholding MPs’ approval until all stages of legislation to ratify it have been completed.

Senior Labour figures on stage to support a Final Say on Saturday (AFP/Getty) (AFP via Getty Images)

The move was a remarkable demonstration of the lack of trust in the prime minister from Tory exiles, who fear that victory for the prime minister would free him to crash the UK out of the EU without a deal in 12 days’ time by failing to legislate for the agreement’s implementation.

But instead of confirming he would comply with the legal requirement to request a Brexit extension, Johnson took to the despatch box to say he was not “dismayed or daunted” by the setback and declare: “I will not negotiate a delay with the EU, neither does the law compel me to do so.”

He later wrote to all MPs and peers to say that the outcome was a matter of “great regret” to him, but that he would continue to do all he could to deliver Brexit by 31 October.

“I will tell the EU what I have told the British public for my 88 days as prime minister: further delay is not a solution,” wrote the prime minister.

Mr Johnson said it was “quite possible” that the EU would reject a further extension or refuse to take a decision quickly.

“In these circumstances, I hope colleagues on all sides of the House will – faced with a choice of our new deal or no deal – support this new deal,” he said.

Mr Corbyn said it was time for the PM to give up the threat of a crash-out Brexit, telling MPs: “He can no longer use the threat of a no-deal crash-out to blackmail members to support his sell-out deal.”

In a statement, Leo Varadkar, Ireland’s prime minister, noted that an extension beyond 31 October “can only be granted by unanimity” of the 27 remaining EU leaders.

The office of French president Emmanuel Macron said a further delay was “in the interests of no one”.

Commons leader Jacob Rees-Mogg said the government was planning to give MPs another chance on Monday to approve the last-minute deal sealed by Johnson in Brussels on Thursday.

But Mr Bercow signalled he may not allow the motion to be put forward again so soon, telling MPs it would be “most curious and irregular” if its purpose was to seek to invalidate today’s vote.

And a Tory rebel source accused Mr Johnson of “petulance”, pointing out that the successful amendment states that approval cannot be granted “unless and until” ratification through a Withdrawal Agreement Bill is complete.

“This sends a clear signal that the prime minister should now bring forward the Withdrawal Agreement Bill, not a meaningful vote, on Monday so that MPs can vote for or against it,” said the source. “In the meantime, he must comply with the law.”

Protesters gather outside parliament for the Final Say march (AP)

If Mr Johnson is unable to secure a meaningful vote on Monday, he will hope to reverse his defeat during the passage of the Withdrawal Agreement Bill over the coming days.

But scrutiny of the bill is likely to be a fiercely fought affair, giving MPs plenty of opportunities to insert amendments to require a second referendum.

People’s Vote organisers estimated the size of Saturday’s demonstration in favour of a public vote was up to 1 million, making it one of the biggest public protests in British history. Marchers and supporters flocked to sign a letter to MPs, MEPs, the prime minister and the leaders of the other 27 EU states calling for a Final Say ballot.

Ministers including Mr Johnson’s no-deal supremo Michael Gove were given police escorts to leave the Palace of Westminster, which was surrounded by thousands of protesters, leading business secretary Andrea Leadsom to complain of “intimidation”.