MPs have approved Boris Johnson’s Brexit deal in principle, taking the country closer than ever before to leaving the European Union.

The withdrawal agreement bill was given a second reading by 30 votes in a moment of triumph for the prime minister – seven months after Theresa May’s deal was thrown out for the third and final time.

Some 19 Labour MPs defied Jeremy Corbyn by voting with the Conservatives to deliver the bigger-than-expected victory, along with 18 expelled Tories, including Philip Hammond and Amber Rudd.

But the prime minister's triumph was be short-lived, as MPs rejected his attempt to ram the legislation through the Commons in just three days in another crunch vote moments later.

Mr Johnson had earlier issued a dramatic threat to abandon the bill altogether and force a general election if MPs delayed Brexit until January, by forcing more debate.

With his hopes of leaving the EU at Halloween all but dead, Mr Johnson then announced he would "pause" the passage of the Brexit deal bill until the EU had made a decision on offering an extension.

Nevertheless, the second reading for the bill is a remarkable turnaround on the situation just a few weeks’ ago, when any deal appeared impossible.

Even when Mr Johnson caved into EU demands and abandoned his allies in the Democratic Unionist Party, by signing up to a customs border in the Irish Sea, he was expected to lose at Westminster.

But members of the hard-line European Research Group of Tory backbenchers also switched sides and enough Labour MPs defied Mr Corbyn to help get the deal over the line.

Final Say march: Independent's best photos Show all 70 1 /70 Final Say march: Independent's best photos Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Final Say march: Independent's best photos People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent

The so-called programme motion - setting out his planned timetable - was defeated by 322 votes to 308, prompting the government to shelve it and announce its intention to bring back debate on the Queen's Speech instead.

Mr Johnson told MPs: "I will speak to EU member states about their intentions. Until they have reached a decision we will pause this legislation."

He added: "Let me be clear. Our policy remains that we should not delay, that we should leave the EU on October 31 and that is what I will say to the EU and I will report back to the House.