LONDON (AP) — British Prime Minister Theresa May on Tuesday won a few weeks to salvage a Brexit deal but headed toward a clash with the European Union by promising to overhaul the divorce agreement she spent a year and a half negotiating with the bloc.

Trying to break the U.K.’s Brexit deadlock, May got Parliament’s backing for a bid to rework an Irish border guarantee in the withdrawal deal — a provision May and the EU both approved, and which the bloc insists cannot be changed.

“It is now clear that there is a route that can secure a substantial and sustainable majority in this House for leaving the EU with a deal,” she said, promising to “obtain legally binding changes to the withdrawal agreement” from the EU.

The EU immediately ruled that out, insisting in a statement that the current deal with the U.K. remained the “best and only way” to achieve an orderly Brexit. French President Emmanuel Macron said the agreement “is the best accord possible. It is not re-negotiable.” Guy Verhofstadt, the top Brexit official at the European Parliament, said there was “no majority to reopen or dilute” the deal.

It was the latest disorienting chapter in a Brexit process that has grown increasingly surreal since Parliament rejected May’s divorce deal two weeks ago, leaving Britain lurching toward a cliff-edge no-deal” departure from the bloc on March 29.

A series of Commons votes Tuesday on next steps submitted by both pro-Brexit and pro-EU legislators ended up sending starkly mixed signals, as lawmakers backed a call to renegotiate the deal, and also approved a rival motion ruling out a no-deal exit.

May had urged lawmakers to “send an emphatic message” to the EU, but their response is likely to leave the bloc even more confused about British aims.

May believes her agreement can still win Parliament’s backing if it is changed to alleviate concerns about the Irish border measure, known as the backstop. The backstop would keep the U.K. in a customs union with the EU in order to remove the need for checks along the border between the U.K.’s Northern Ireland and EU member Ireland after Britain leaves the bloc.

The border is crucial to the divorce deal because it will be the only land frontier between the U.K. and the EU after Brexit, and because the free flow of people and goods underpins both the local economy and Northern Ireland’s peace process.

Opposition to the backstop by pro-Brexit lawmakers — who fear it will trap Britain in regulatory lockstep with the EU — helped sink May’s deal on Jan. 15, when Parliament rejected it in a 432 to 202 vote.

On Tuesday, Parliament backed, by 317 votes to 301 votes, a call for the border measure to be replaced by unspecified “alternative arrangements.”

Leading Brexiteers praised the result. Former Foreign Secretary Boris Johnson said Parliament had sent a “clear, unambiguous” message that the backstop had to be removed.

“I hope that our friends in Brussels will listen and that they will make that change,” he said.

But Green Party legislator Caroline Lucas, who wants a new referendum on Britain’s EU membership accused May of chasing “heated-up fantasies that have already been rejected by the EU.”

May acknowledged that the EU had “limited appetite” for changing the Brexit deal. But she vowed to go to Brussels and seek “significant and legally binding change” to the backstop. May’s office said that might include an end date to ensure it is temporary or an exit clause for Britain. Both those ideas have been repeatedly rejected by the EU.

“There can be no change to the backstop,” said Ireland’s European Affairs Minister, Helen McEntee. “It was negotiated over 18 months with the U.K. and by the U.K.”

Lawmakers voted on seven Brexit proposals Tuesday, including the border change supported by May and several measures that sought to rule out a “no-deal” Brexit.

Much of the business world says a no-deal Brexit would cause economic chaos by eliminating existing EU trade agreements and imposing tariffs, customs checks and other barriers between the U.K. and the EU, its main export market.

Most members of Parliament oppose leaving without a deal, but they rejected several proposals that tried to wrest control of the Brexit process from the government and give it to Parliament so lawmakers could stop Britain crashing out of the EU without a deal. Some opposition Labour Party members sided with the government, worried about being seen as obstructing Brexit.

Lawmakers approved, by a narrow 318 votes to 310 votes, a motion ruling out a “no-deal” Brexit but not saying how that should be achieved. The vote is not legally binding, but has political force as an expression of the will of Parliament.

Tuesday’s ambiguous votes won’t mark the end of Britain’s turmoil over Brexit: There could be a rerun in two weeks. May said if she has not struck a new Brexit deal by Feb. 13, Parliament would get to vote, again, on what should happen next.

Robert Hazell, professor of government and the constitution at University College London, said the EU was “pretty resolute in not being willing to reopen the negotiations unless the British government can come back with something more specific.”

“Tonight’s votes only kick the can down the road for another two weeks,” he said.