Image copyright UK Parliament Image caption The moment an amendment is passed by MPs delaying Brexit

The government says it will push ahead with efforts to pass its Brexit deal, despite a major setback to its plans.

Boris Johnson had to ask the EU for an extension to the UK's 31 October exit date after MPs backed a move to delay approval of the deal on Saturday.

But Foreign Secretary Dominic Raab said he was confident enough MPs would back the deal next week, and Brexit would still happen by the deadline.

Labour, however, has said it will back moves to put the deal to a referendum.

No 10 said the PM sent "Parliament's letter" to Brussels - unsigned - and accompanied it with a second letter - which was signed - explaining why he believed a delay would be a mistake.

The government has vowed to press ahead with the legislation - the Withdrawal Agreement Bill (WAB) - to implement the Brexit deal next week.

Why has the PM asked for another extension?

Having reached a new Brexit deal with the EU last week, the prime minster had intended to bring it to Parliament and ask MPs to approve it in a so-called "meaningful vote".

However, in the first Saturday sitting in the Commons for 37 years, MPs instead voted in favour of an amendment withholding approval of the deal until all the necessary legislation to implement it had been passed.

Tabled by Independent MP Sir Oliver Letwin, the amendment was intended to ensure that Mr Johnson would comply with the terms of the so-called Benn Act designed to eliminate any possibility of a no-deal exit on 31 October.

Under that act, Mr Johnson had until 23:00 BST on Saturday to send a letter requesting a delay to the UK's departure - something he did, albeit without his signature.

Boris Johnson's Brexit deal

Image copyright AFP

ANALYSIS: Chances of agreement still strong, says Laura Kuenssberg

IN BRIEF: What happened on Saturday?

EXPLAINED: How another delay would work

IN GRAPHICS: What happens now?

How has the government reacted?

Mr Raab told the BBC's Andrew Marr show that "notwithstanding the parliamentary shenanigans, we appear to have now the numbers to get this through".

He said there were "many people in the EU" who were "deeply uncomfortable" about a further delay to Brexit and urged MPs to "get on, get it through the House of Commons, and move on."

Media playback is unsupported on your device Media caption Foreign Secretary Dominic Raab says he's confident the UK will leave the EU on 31 October

His colleague, Michael Gove, chancellor of the Duchy of Lancaster, accused those who backed the Letwin amendment of voting "explicitly to try to frustrate this process and to drag it out".

He told Sky News' Sophy Ridge on Sunday "we have a deal that allows us to leave" on 31 October, but the government would now trigger Operation Yellowhammer - its contingency plan to handle a no-deal Brexit - because there was no guarantee the EU would grant an extension.

The government is set to ask for a further meaningful vote on Monday, presenting MPs with a binary choice to approve or oppose the deal in principle.

However, it will be up to Commons Speaker John Bercow to decide whether to allow that vote.

BBC Deputy Political Editor John Pienaar says the thinking at Westminster is that Mr Bercow will not permit a re-run of the vote.

He says to "expect a good row about that", adding that the Speaker has been clear in the past that he sees no reason to repeat a debate "just because the loser doesn't like losing".

What is Labour saying?

Labour had planned to vote against Boris Johnson's deal - although a few rebels would likely have backed it - arguing it would be bad for the economy, jobs, workers' rights and other areas like the environment.

Shadow Brexit secretary Sir Keir Starmer accused the prime minister of "being childlike" by sending a second letter to the EU contradicting the first stipulated by the Benn Act.

He told Andrew Marr his party would seek to amend the deal when the WAB is brought to Parliament, for example by demanding a UK-wide customs union with the EU and single market alignment.

Media playback is unsupported on your device Media caption Labour's Keir Starmer says Boris Johnson has been "childlike" with his unsigned letter

He said Labour would look for ways to avoid "a trapdoor to no-deal at the end of 2020" - some critics of Mr Johnson's agreement fear there are no provisions to prevent a no-deal exit at the end of the transition period if no free trade agreement has been reached with the EU.

Sir Keir also said his party would support an amendment requiring the deal to be put to another referendum.

He said he believed that would most likely be tabled by a backbencher, but insisted: "It's got to go back to the public."

Organising another public vote would take a minimum of 22 weeks, according to experts at the Constitution Unit at University College London (UCL), and Sir Keir accepted that sort of timescale was reasonable.

A government also cannot just decide to hold a referendum. Instead, a majority of MPs and Lords would need to agree and vote through the rules, and there would likely be deep divisions over the wording of the question, the number of options on the ballot paper and the voting system.

Lucy Powell, Labour MP for Manchester Central, told Sky News "those advocating a second referendum know the numbers aren't there". The PM's deal was "now likely to pass", she continued, adding that next few days and weeks "are our final chance to shape Brexit".

What about the EU?

EU Council President Donald Tusk has acknowledged receipt of the UK's extension request and said he would consult EU leaders "on how to react".

Ambassadors from the 27 EU nations met for about 15 minutes in Brussels on Sunday morning and continued the legal process of ratifying the Brexit deal on the EU side.

The EU's Chief negotiator, Michel Barnier, told diplomats the passage of the Letwin amendment did not mean that the deal had been rejected.

Media playback is unsupported on your device Media caption Sir Oliver Letwin: Brexit deal "is not perfect but it will do"

Mr Letwin himself told the BBC's Andrew Marr on Sunday his amendment was "an insurance policy" and now it had passed, he would give his full support to the prime minister's deal.

All 27 EU nations must agree to any extension to Brexit, and French President Emmanuel Macron has already signalled he believed a new Brexit extension was not good for anyone.

However, BBC Europe editor Katya Adler said if the alternative was a no-deal Brexit, the EU was unlikely to refuse - although it would want to know what any extension was for - a general election, another referendum, or merely a bit more time needed to pass Brexit-related legislation?

Could this all end up in court?

Just weeks after the Supreme Court ruled Mr Johnson's prorogation of Parliament was unlawful, some suggest his attempts to undermine the Benn Act with a second letter could see him back there again.

Shadow chancellor John McDonnell suggested the PM could be "in contempt of Parliament or the courts". That was echoed by SNP Westminster leader Ian Blackford, although he refused to be drawn on any court action this week.

Scotland highest court, the Court of Session, is due to meet on Monday to consider the matter. It was asked earlier this month to sign a letter fulfilling the terms of the Benn Act on the prime minister's behalf if he failed to do so, but judges delayed giving a ruling to allow the political debate to play out.

The SNP's Joanna Cherry pointed out that the government gave an undertaking to the court not to frustrate the act, but she said "now arguably that is what he has done".

The government insists it has complied with the requirements of the Benn Act.

What is the Withdrawal Agreement Bill?

The UK needs to pass a law to implement the withdrawal agreement - the part of the PM's Brexit deal which will take the country out of the EU - in UK law.

It has to secure the backing of a majority of MPs and peers, and a vote for the Brexit deal itself is no guarantee of a vote for the legislation required to implement it.

The bill gives legal effect to any agreed transition period and fulfils requirements on the rights of EU citizens in the UK after Brexit. It will also allow ministers to make "divorce payments" to the EU foreseen under the current deal.

MPs will be able to vote on amendments - changes or add-ons - to the bill, for instance stipulating Parliament's role in the future relationship negotiation, or for the deal to be put to a referendum.

If the government cannot get the WAB through Parliament the default legal position is that the UK cannot ratify the deal, and so would leave on 31 October without a deal. However, that is dependent on no extension beyond that date having been already agreed with the EU.