LONDON — British Prime Minister Theresa May rolled the dice Thursday on another Brexit vote in Parliament, sending a tweaked and trimmed version of her EU divorce deal back to lawmakers who had rejected it twice before.

But the agreement faced substantial opposition, even after May sacrificed her job for her deal, promising to quit if lawmakers approved the deal and let Britain leave the EU on schedule in May.

House of Commons Leader Andrea Leadsom announced that Parliament would vote Friday on the 585-page withdrawal agreement that sets out the terms of Britain’s departure — but not a shorter declaration on future ties that is also part of the divorce deal agreed between the U.K. and the EU late last year.

Its removal altered the deal enough to overcome a ban on against asking lawmakers the same question over and over again.

If the withdrawal agreement is approved by 11 p.m. U.K. time (7 p.m. EDT), the EU has agreed to delay Britain’s departure from the bloc until May 22.

If it is rejected, Britain has until April 12 to announce a new plan or leave the bloc without a deal, risking severe disruption for people and businesses.

“I encourage all MPs to support it and ensure that we leave the EU on the 22nd of May, giving people and businesses the certainty they need,” Leadsom said.

May pledged Wednesday that she would resign if the deal was approved, in hopes of blunting opposition from pro-Brexit lawmakers in her Conservative Party, who accuse her of negotiating a bad divorce deal that leaves Britain too closely tied to the bloc.

Some prominent opponents, including former Foreign Secretary Boris Johnson, quickly said they would back the Brexit agreement, but Northern Ireland’s Democratic Unionist Party said it remained opposed because of concern that the deal treats the region differently from other parts of the U.K.

The main opposition Labour Party also said it would not vote for the deal Friday.

Labour Party Brexit spokesman Keir Starmer said removing the political declaration, which sets out a loose framework for future relations between Britain and the bloc, would leave the next stage of negotiations in the hands of May’s successor. That is very likely to be someone from the hard-line pro-Brexit wing of the Conservative Party.

Starmer said it would amount to “leaving the EU with absolutely no idea where we’re heading.”

Almost three years after Britain voted to leave the EU, Brexit has brought the country’s political system to a standstill. The impasse has frustrated EU politicians trying to negotiate an exit agreement, and it has surprised observers around the world who had viewed Britain’s 1,000-year-old parliamentary system as a model of stability.

The gridlock has brought the country to the precipice of a chaotic departure from the EU.

Pro-EU Conservative lawmaker Ken Clarke said Parliament was mired in “confusion and mayhem.”

“We’ve wasted the first three years. We’re back almost at square one,” he said.