(CNN) UK Prime Minister Theresa May is attempting to face down the biggest crisis of her leadership, denouncing her former Foreign Secretary over his failure to back her Brexit strategy and demanding loyalty from the rest of her Cabinet.

May delivered a stinging rebuke to Boris Johnson, who became the second leading pro-Brexit figure to quit the Cabinet within 24 hours on Monday after David Davis resigned as Brexit Secretary on Sunday night. Three other junior members of her government also stepped down, in a tumultuous day for the Prime Minister.

She moved swiftly to replace the ministers who quit, in a move that suggested she was prepared for resignations after securing a hard-won deal on Brexit at a special Cabinet summit Friday . That deal, which will form the basis of negotiations with the EU, envisages a closer future relationship with the EU than many Brexit supporters in her Conservative party can stomach.

But May's calculation is that they do not have enough support to topple her. Under the rules of her party, May can face a no-confidence vote if at least 15% of Conservative members of Parliament demand one -- 48 at the current count. But she would almost certainly survive, as opponents would need to muster 159 MPs to vote against her.

Late Monday, May replaced Johnson with Jeremy Hunt, formerly the Health Secretary, who campaigned for the UK to remain in the EU in the runup to the 2016 Brexit referendum. His appointment means that the four most senior positions in the UK executive -- Prime Minister, Chancellor, Home Secretary and Foreign Secretary -- are now held by people who campaigned for Remain in the referendum.

Davis' replacement, Dominic Raab, supported the Leave campaign , but not in as high profile a role as Johnson or Davis.

JUST WATCHED Boris Johnson resigns as UK Foreign Secretary Replay More Videos ... MUST WATCH Boris Johnson resigns as UK Foreign Secretary 02:22

Brexit 'dream is dying'

In his resignation letter to May , Johnson was searing in his criticism of her strategy. He said the Brexit "dream is dying, suffocated by needless self-doubt," and savaged her strategy in negotiations with Europe.

In particular, he rejected the deal agreed that he and other Cabinet members had agreed at the prime minister's Chequers residence last week as leaving the UK in "the status of colony."

"We are now in the ludicrous position of asserting that we must accept huge amounts of precisely such EU law, without changing an iota, because it is essential for our economic health -- and when we no longer have any ability to influence these laws as they are made," Johnson said.

May replied saying she was "surprised" at Johnson's decision to quit, and adding that she would no longer allow members of the Cabinet to express diverging views on Brexit strategy.

In government, Johnson had been publicly critical of May and the Brexit negotiations, undermining her authority and testing the UK constitutional convention that all members of the Cabinet should collectively support decisions made by it, even if they personally disagree with them

"If you are not able to provide the support we need to secure this deal, in the interests of the United Kingdom, it is right that you should step down," May told Johnson in her reply to his resignation letter.

JUST WATCHED How Brexit could end flights in and out the UK Replay More Videos ... MUST WATCH How Brexit could end flights in and out the UK 03:30

Fire from all sides

In Parliament to defend her strategy Monday, May was savagely criticized by Labour leader Jeremy Corbyn, whose party is rapidly entering election mode in the hopes that the government -- which only has a one seat majority in parliament -- will soon collapse.

"At such a crucial time for our country in these vital negotiations, we need a government that is capable of governing and negotiating for Britain," Corbyn said, to loud approval from the opposition benches. "For the good of this country and its people, the government needs to get its act together and do it quickly, and if it can't, make way for those who can."

We need a government that is capable of governing. pic.twitter.com/HWvoxyEyVw — Jeremy Corbyn (@jeremycorbyn) July 9, 2018

May is in the bizarre situation of fending off attacks from Corbyn, using him as the bogeyman to stave off Tory party rebels , and potentially depending on his party for votes to pass any Brexit legislation.

The deal agreed at Chequers last week -- which has yet to be put to the EU -- represents a far softer vision of Brexit than many of the hardliners in May's party have publicly pledged to pursue, setting the stage for a significant rebellion from the Tory backbenches.

In an opinion piece Monday , Jacob Rees-Mogg, a leading anti-EU figure promoted by some Conservatives as a future party leader, said if the Chequers deal was presented to Parliament "I will vote against (it), and others may well do the same."

"If they plan to get this deal through on the back of Labour votes, that would be the most divisive thing that they can do," Rees-Mogg told the Guardian after reports a senior May aide had briefed opposition MPs on her Brexit plan.

While Labour has advocated a "soft Brexit" which retains many of the benefits of the EU -- chiefly the customs union and single market -- there is no guarantee Corbyn's party would support May's strategy when it could capitalize on a fractured government to leapfrog into power.

"Theresa May has successfully kicked the can down the road on a number of occasions, but now she has run out of road," Labour's shadow Brexit secretary Keir Starmer wrote after Johnson's resignation

"It is now time for the majority in parliament to be heard. It's a majority that rejects the extreme approach to Brexit advocated by some in the Tory party. The prime minister has shown she is incapable of negotiating a way forward. She should let parliament lead the way."

JUST WATCHED Why the Irish border is impacting Brexit Replay More Videos ... MUST WATCH Why the Irish border is impacting Brexit 01:59

Shaky premiership

As if attempting to balance negotiations with Tory rebels, opposition figures, and European ministers was not enough, May could also face a leadership challenge in the coming days or weeks.

Johnson invited photographers to witness him signing his resignation letter to May, earning him a prominent position on the front page of the right wing Daily Telegraph, under the headline "The Brexit dream is dying."

'The Brexit dream is dying' - the front page of The Daily @Telegraph tomorrow #tomorrowspaperstoday pic.twitter.com/K0YaDknx2T — The Telegraph (@Telegraph) July 9, 2018

His theatrics will do nothing to quash suspicions that he hopes to replace May as leader, even as Rees-Mogg said Johnson would make a "brilliant prime minister."

A leadership challenge can be sparked by 48 MPs writing to the Conservative's influential 1922 Committee, and while aides of May have been briefing the press that she is confident of fending off any such vote, it is surely not something she relishes.

The potential wild card in all of this is the Democratic Unionist Party, the group of hardline right wing Northern Irish MPs upon whom May depends for her parliamentary majority.

While the DUP are seen as supporters of a "soft Brexit," deputy leader Nigel Dodds sounded a warning over the Chequers deal in Parliament Monday, saying his party would not support any agreement with the EU that includes a so-called "backstop" clause on a hard Irish border.

All parties to Brexit negotiations have stated a wish to avoid a hard border between Northern Ireland and the Republic of Ireland, which currently have no boundaries thanks to EU free movement laws, and in December May agreed that in the absence of any other solution, Northern Ireland would remain in "full alignment" with EU rules

While negotiations on this issue are ongoing, the EU has insisted the UK agree to full alignment as a legally binding "backstop" clause to ensure there is never a hard border.

This is unacceptable to the DUP, who have vehemently rejected the idea of special arrangements for Northern Ireland, which they fear would create a border between the country and mainland Britain, emboldening Irish opposition parties who favor joining the Republic.

"We welcome the Prime Minister's commitment to ensuring that the Brexit deal in no way weakens the United Kingdom, but it is also vitally important that the EU's interpretation of the backstop is rejected and ensure there is no border down the Irish sea," Dodd said this week.