Media playback is unsupported on your device Media caption Dominic Raab, who quit as Brexit secretary, says a change of course is needed

Brexit Secretary Dominic Raab says he quit the cabinet over "fatal flaws" in the draft Brexit agreement with the EU.

And he told the BBC the UK should be ready to risk a no-deal Brexit in the face of EU "blackmail".

Another cabinet minister, Esther McVey, also quit alongside junior ministers Suella Braverman and Shailesh Vara.

PM Theresa May faced nearly three hours of largely hostile questions in the Commons and could potentially face a vote of no confidence from Tory MPs.

BBC political editor Laura Kuenssberg said a source had told her Michael Gove has been offered the job of Brexit Secretary and he was understood to be considering it, but to be asking for assurances that he could pursue a different kind of deal.

Theresa May could face confidence vote

Leading backbench Brexiteer Jacob Rees-Mogg has submitted a letter of no confidence in her to Sir Graham Brady, chairman of the Tories' backbench 1922 Committee.

A vote will be triggered if 48 Tory MPs write letters to Sir Graham. It is understood 48 letters have not yet been received.

Mr Rees-Mogg told reporters that the negotiations had "given way on all the key points" adding: "The deal risks Brexit because it is not a proper Brexit."

He denied being involved in a coup against the PM, saying he was "working through the procedures of the Conservative Party" which was "entirely constitutional".

Mr Rees-Mogg said he did not have any leadership ambitions of his own but listed Brexiteers Boris Johnson, David Davis, Dominic Raab, Esther McVey and Penny Mordaunt as among those who would be "very capable of leading a proper Brexit".

Downing Street said Mrs May would fight any no-confidence vote.

Asked by Labour MP Mike Gapes if it was time she "stood aside for someone else who could take this country forward in a united way", Mrs May replied: "No."

Media playback is unsupported on your device Media caption How the Conservative Party handles a leadership challenge

Chief whip Julian Smith said the prime minister "will not be bullied" into changing course.

And Foreign Office minister Sir Alan Duncan described Mr Rees-Mogg's comments as "deeply destructive" and warned Conservative MPs: "If this government is undermined further, we could destroy the government, we could significantly damage and even destroy the Conservative Party, all of which would be happening in the middle of an unconcluded set of Brexit negotiations."

He added: "We have a massive responsibility to exercise our judgement in a climate of what has to be compromise."

May defends Brexit plan in Commons

Media playback is unsupported on your device Media caption Theresa May tells MPs: "I don't pretend this has been a comfortable process."

The day after Theresa May announced that she had secured the backing of her cabinet for the withdrawal agreement, she told MPs it was not a final agreement, but brought the UK "close to a Brexit deal".

But she was met with laughter and shouts of "resign" as she said it would allow the UK to leave the EU "in a smooth and orderly way" on 29 March

The prime minister told MPs the agreement would deliver the Brexit people voted for and allow the UK to take back control of its "money, laws and borders".

But Labour Leader Jeremy Corbyn said: "This is not the deal the country was promised and Parliament cannot - and I believe will not - accept a false choice between this bad deal and no deal."

Why did Raab quit?

Image copyright Reuters

Dominic Raab - a Leave supporter promoted to the cabinet to replace David Davis who quit in protest at Mrs May's Brexit plans in July - is the most high-profile minister to quit the government.

He was closely involved in drafting the 585-page document, which sets out the terms of Britain's departure from the EU.

He told the BBC's political editor Laura Kuenssberg: "I've been fighting for a good Brexit deal but the terms proposed to the cabinet yesterday [Wednesday], I think, had two major and fatal flaws.

"The first is that the terms being offered by the EU threaten the integrity of the United Kingdom and the second is that they would lead to an indefinite if not permanent situation where we're locked into a regime with no say over the rules being applied, with no exit mechanism.

"I think that would be damaging for the economy but devastating for public trust in our democracy."

He said Theresa May needed a Brexit secretary who "will pursue the deal that she wants to put to the country with conviction".

"I don't feel I can do that in good conscience," he added.

He said he held Mrs May in "high esteem" but said: "I do think we need to change course on Brexit".

And he said the government should be willing to risk a no-deal Brexit in the face of what he described as the EU's "blackmail".

The alternative for the prime minister was her inevitable defeat in the Commons, he argued.

Asked if he would put himself forward for leader, if the government falls apart, he did not rule it out but said it would be "irresponsible" to be talking about that now.

Who else has resigned?

In her resignation letter, Work and Pensions Secretary Esther McVey told Mrs May the agreement does not "honour the result of the referendum, indeed it does not meet the tests you set from the outset of your premiership".

"We have gone from 'no deal is better than a bad deal' to any deal is better than no deal," she added.

Anne-Marie Trevelyan, a ministerial aide at the education department, has also quit, as has Ranil Jayawardena, a ministerial aide at the justice department.

Northern Ireland minister Shailesh Vara was the first to resign over Mrs May's agreement on Thursday morning, saying, it "leaves the UK in a halfway house with no time limit on when we will finally be a sovereign nation". Brexit minister Suella Braverman also quit.

And Rehman Chisti quit as vice chairman of the Conservative Party - partly over the withdrawal agreement.

The opposition's reaction

Media playback is unsupported on your device Media caption Jeremy Corbyn: "No deal is not a real option, and the government has not seriously prepared for it."

Labour leader Jeremy Corbyn said: "After two years of bungled negotiations, the government has produced a botched deal that breaches the prime minister's own red lines and does not meet our six tests.

"The government is in chaos. Their deal risks leaving the country in an indefinite halfway house without a real say."

The SNP's leader at Westminster Ian Blackford said Mrs May was "trying to sell us a deal that is already dead in the water" and expressed outrage that Scotland was not mentioned once in the draft withdrawal agreement.

What is in the withdrawal agreement?

commitments over citizens' rights after Brexit - people will be able to work and study where they currently live and to be joined by family members

a proposed 21-month transition period after the UK's departure

a "fair financial settlement" from the UK - also known as the £39bn "divorce bill"

But the controversial part relates to what will happen to the Irish border.

The agreement includes a "backstop" - a kind of safety net to ensure there is no hard border whatever the outcome of future trade talks between the UK and the EU.

Media playback is unsupported on your device Media caption When will Brexit happen?

If there is no trade deal in place by the end of the transition period, the backstop will mean that Northern Ireland would stay aligned to some EU rules on things such as food products and goods standards.

It would also involve a temporary single customs territory, effectively keeping the whole of the UK in the EU customs union.

Brexiteers do not like the prospect of potentially being tied to EU customs rules for years or even, as some fear, indefinitely.

And Northern Ireland's Democratic Unionist Party has said it will not tolerate anything that creates a new border down the Irish Sea and they will not vote for the agreement.

Setting out details of the arrangements for a possible "backstop", Mrs May said: "I do not pretend that this has been a comfortable process, or that either we or the EU are entirely happy with some of the arrangements which have been included in it."

But she added that "while some people might pretend otherwise, there is no deal which delivers the Brexit the British people voted for which does not involve this insurance policy".

She insisted it was a last resort and would be time-limited.

Please upgrade your browser Your guide to Brexit jargon Enter the word or phrase you are looking for Search

What happens now?

Much will depend on whether Mrs May faces a vote of no-confidence in her leadership. If she does, all bets are off.

If not, European Council President Donald Tusk has announced an emergency meeting of EU leaders in Brussels on 25 November, at which the withdrawal agreement and a political declaration on future relations would be finalised and formalised.

The BBC's Brussels correspondent Adam Fleming said the UK and the EU will have to agree an ultimate end date for the post-Brexit transition period by the end of next week.

The transition period is due to end in 2020 and can be extended once by mutual agreement.

The text of the draft withdrawal agreement currently says the end date is "20XX".

A senior EU official said the negotiators will have to fill in a specific year by the 25 November summit.

Ultimately any deal would be put to MPs. Tory backbencher Mark Francois told Mrs May earlier that with Labour, the SNP, the Lib Dems and scores of Tory MPs planning to vote against it, it is "mathematically impossible to get this deal through the House of Commons".