The British government saw its flagship Brexit legislation pass through Parliament on Wednesday, but remains locked in a tussle with lawmakers over the direction of the country’s departure from the European Union.

The EU Withdrawal Bill was approved after Prime Minister Theresa May’s government narrowly won a key vote. The House of Commons rejected by 319-303 a proposal to require Parliament’s approval before the government agrees to a final divorce deal with the EU, or before walking away from the bloc without an agreement.

Later in the day, the withdrawal bill, intended to replace thousands of EU rules and regulations with U.K. statute on the day Britain leaves the bloc, also passed in the unelected House of Lords, its last parliamentary hurdle. It will become law once it receives royal assent, a formality.

Lawmakers favor close ties to EU

A majority of lawmakers favor retaining close ties with the bloc, so if the amendment requiring parliamentary approval had been adopted, it would have reduced the chances of a “no deal” Brexit. That’s a scenario feared by U.K. businesses but favored by some euroskeptic members of May’s Conservative minority government, who want a clean break from the EU.

May faced rebellion last week from pro-EU Conservative legislators, but avoided defeat by promising that Parliament would get a “meaningful vote” on the U.K.-EU divorce agreement before Brexit occurs in March.

Pro-EU lawmakers later accused the government of going back on its word by offering only a symbolic “take it or leave it” vote on the final deal and not the ability to take control of the negotiations.

Labour Party Brexit spokesman Keir Starmer accused May of telling Parliament: “Tough luck. If you don’t like my proposed deal, you can have something much worse.”

The rebels sought to amend the flagship bill so they could send the government back to the negotiating table if they don’t like the deal, or if talks with the EU break down.

The government claimed that would undermine its negotiating hand with the EU.

“You cannot enter a negotiation without the right to walk away,” Brexit Secretary David Davis told lawmakers. “If you do, it rapidly ceases to be a negotiation.”

But Davis also told lawmakers it would be for the Commons speaker to decide whether lawmakers could amend any motion on a Brexit deal that was put to the House of Commons.

Concession enough

The concession was enough to get Conservative lawmaker Dominic Grieve, a leader of the pro-EU rebel faction, to back down and say he would support the government.

Grieve said the government had acknowledged “the sovereignty of this place (Parliament) over the executive.”

While the withdrawal bill cleared a major hurdle, the government faces more tumult in Parliament in the months to come over other pieces of Brexit legislation.

It has been two years since Britain voted by 52-48 percent to exit the 28-nation EU after four decades of membership, and there are eight months until the U.K. is due to leave the bloc on March 29, 2019.

But Britain, and its government, remains divided over Brexit, and EU leaders are frustrated with what they see as a lack of firm proposals from the U.K about future relations.

May’s government is divided between Brexit-backing ministers such as Foreign Secretary Boris Johnson who support a clean break with the EU, and those such as Treasury chief Philip Hammond who want to keep closely aligned to the bloc, Britain’s biggest trading partner.

EU: No deal is worst scenario

The European Parliament’s leader on Brexit, Guy Verhofstadt, said Wednesday that he remains hopeful a U.K.-EU withdrawal agreement could be finalized by the fall so national parliaments have time to approve it before March.

“The worst scenario for both parties is no deal,” he told a committee of British lawmakers. “The disruption that would create to the economy, not only on the continent but certainly in Britain, would be huge and that we have to avoid.”