LONDON — Prime Minister Theresa May defied mounting calls to quit or change course Thursday over Britain’s withdrawal from the European Union, warning that abandoning her Brexit plan would plunge the country into “deep and grave uncertainty.”

Britain’s divisions over its future in the EU erupted into turmoil just a day after the government agreed to a divorce deal with the bloc. Two Cabinet ministers resigned and some lawmakers from May’s own party called for her to be replaced. The crisis threatened to destroy the Brexit agreement, unseat the prime minister and send the U.K. hurtling toward the EU exit without a plan.

In a news conference aimed at regaining some control, May said she believed “with every fiber of my being that the course I have set out is the right one for our country and all our people.”

“Am I going to see this through? Yes,” she said.

The agreement with the EU has infuriated pro-Brexit members of May’s divided Conservative Party. They say the agreement, which calls for close trade ties between the U.K. and the bloc, would leave Britain a vassal state, bound to EU rules it has no say in making.

May insisted that Brexit meant making “the right choices, not the easy ones” and urged lawmakers to support the deal “in the national interest.”

But she was weakened by the resignation of two senior Cabinet ministers, including Brexit Secretary Dominic Raab. Hours after he sat in the meeting that approved the deal, Raab said he “cannot in good conscience” support it.

Work and Pensions Secretary Esther McVey followed Raab out the door. She said in a letter that it is “no good trying to pretend to (voters) that this deal honors the result of the referendum when it is obvious to everyone that it doesn’t.”

A handful of junior government ministers also quit, and leading pro-Brexit lawmaker Jacob Rees-Mogg called for a vote of no-confidence in May.

Rees-Mogg said May’s deal “is not Brexit” because it would keep Britain in a customs union with the EU, potentially for an indefinite period. He said May was “losing the confidence of Conservative members of Parliament.”

Rees-Mogg called for May to be replaced by a more firmly pro-Brexit politician, naming ex-Foreign Secretary Boris Johnson, former Brexit Secretary David Davis and Raab as potential successors.

Under Conservative rules, a confidence vote in the leader is triggered if 15 percent of Conservative lawmakers — currently 48 — write a letter to the party’s 1922 Committee of backbenchers, which oversees leadership votes.

Only committee chairman Graham Brady knows for sure how many missives have been sent, but Rees-Mogg’s letter is likely to spur others to do the same.

If a confidence vote is held and May loses, it would trigger a party leadership contest in which any Conservative lawmaker — except her — could run.

The turmoil is the latest eruption in the Conservative Party’s long-running civil war over Europe. Ever since Britain joined what was then the European Economic Community in 1973, the party has been split between supporters and opponents of Britain’s membership.

In 2016, then-Prime Minister David Cameron called a referendum “to settle this European question in British politics” once and for all.

He was confident the country would vote to remain, but voters opted 52 percent to 48 percent to quit the EU, a result that left both the Conservatives and the country more divided. Cameron’s successor, May, has been struggling ever since to deliver a Brexit that satisfies those who want to leave, reconciles those wanting to remain and doesn’t rock the economy.

May and her supporters say the alternatives to her deal — leaving the bloc without a deal or a second vote on Brexit — are not realistic options. If the agreement was abandoned, “nobody can know for sure the consequences that will follow,” May said.

News that a deal had been struck after a year and a half of negotiations was welcomed in Brussels, and EU chief Donald Tusk called for a Nov. 25 summit of leaders so they can rubber-stamp the agreement.

The deal requires the consent of the European Parliament, whose chief Brexit official, Guy Verhofstadt, welcomed it as “the best agreement we could obtain.”

It also needs approval from Britain’s Parliament before the U.K. leaves the bloc March 29 — and even if May survives as leader, the chances of that look slim.

Her Conservative government doesn’t have a parliamentary majority, and relies on the support of the Democratic Unionist Party from Northern Ireland.

But the DUP has rejected the deal, saying its provisions to avoid a hard border between Northern Ireland and EU member Ireland would impose new barriers between Northern Ireland and the rest of the U.K., weakening the bonds that hold the United Kingdom together.

Opposition parties also signaled they would vote against the agreement.

Main opposition Labour Party leader Jeremy Corbyn said May should withdraw the “half-baked” Brexit deal and that Parliament “cannot and will not accept a false choice between this deal and no deal.”

Ian Blackford, who heads the Scottish National Party in Parliament, said the deal was “dead on arrival” and urged May to “stop the clock and go back to Brussels.”