U.K. Prime Minister Theresa May is headed to a European summit that was set to approve the breakthrough victory in Brexit talks she celebrated last week. Instead, she arrives after a serious defeat at the hands of her own party.

Lawmakers voted 309 to 305 on Wednesday evening to change her government’s planned legislation so that it guarantees they will get a “meaningful vote” on the final deal to leave the European Union at the end of negotiations in 2019. And rather than the Brexit hardliners who have so often undermined her, this time it was pro-Europeans who defected.

The embarrassing reversal for the beleaguered British leader raises questions about whether she can muster enough backing for her vision of Brexit, whose convulsions have dominated U.K. politics for 18 months. While the recent focus was on striking a palatable agreement with the EU on the initial terms of the divorce, the greater challenge has always been on the home front.

Lawmakers in the House of Commons will now have the power to veto the withdrawal treaty before the U.K. leaves the EU if they don’t like the terms. Another defeat looms next week over an amendment that would remove plans to define in law the exact date of Britain’s departure from the bloc.

Max Blain, May’s spokesman, told reporters Wednesday that the government has no plans to withdraw that amendment, although it is considering which aspects of the rest of the bill it may alter.

“She has come back to earth with a bump after her success of last week,” said Mij Rahman, a political analyst at Eurasia Group in London. “This vote increases the prospect of the Commons rejecting May’s deal next October or November.”

Smoother Option

Few people expect May to lose her job. What becomes more likely is that the U.K. will leave the EU in less dramatic fashion than some of May’s ministers wanted and company executives had warned about, the no-deal or “cliff edge” scenario.

The rebels think the divorce process can be extended if needed — something the government rejects — and want to maintain closer ties with the EU.

The country voted 52 percent to 48 percent in June 2016 to abandon the bloc it joined in 1973, but a majority of lawmakers wanted to remain. They acknowledged the popular will by passing the motion to trigger the legal mechanism to leave, though exactly how to do it became the focal point of the argument.

The legislation May wanted to push through would have given her government sweeping powers to start implementing Brexit without parliamentary approval. May had argued that anything else would threaten the “orderly and smooth” Brexit she wants.

While Guy Verhofstadt, the European Parliament’s chief Brexit negotiator, praised British democracy, Justice Minister Dominic Raab called it a “fairly minor setback.” He told the BBC that “it won’t frustrate the Brexit process.”

Divorce Deal

May defied expectations last week and brought home a divorce deal after managing negotiations on the apparently intractable issue of the open border between the U.K. province of Northern Ireland and the Republic of Ireland.

Read More: Why Ireland’s Border Is Brexit’s Vexing Puzzle

An agreement was reached on the divorce bill and the rights of EU citizens so that talks could move on to a future trading relationship. Her team even boasted of winning concessions on the role of the European Court of Justice, which is toxic to euroskeptics.

May will call on EU leaders on Thursday to agree a quick transition deal for Brexit, a senior U.K. government official said. Britain wants the EU to agree that trading rules won’t change during a two-year phase lasting until 2021.

‘Blank Check’

But then she must return to parliament.

The latest amendment to the Brexit law was put forward by former Attorney General Dominic Grieve, a hitherto loyal Conservative and a former cabinet colleague of May. He argued the bill gave the government too much power and shut parliament out.

May made a personal plea in parliament for colleagues to support her. Ministers spent the day proposing concessions aimed at buying off rebels, including a last-minute offer to come back with a new text. That was met with cries of “too late” in the chamber, before her authority took another knock.

“We run the risk of losing sight of the fact that 48 percent of the electorate did not wish for the policy that we are currently pursuing and have deep concerns about,” Grieve said during the seven hour debate. “We run serious risks of badly letting them down — all of them, collectively — by enacting bad legislation and taking very foolish decisions.

Read More: Why Dominic Grieve Is U.K.’s Most Important Man on Brexit

The Conservative Party has long been divided over Europe and the referendum on Brexit aimed to settle the argument. Instead, it’s more divided than ever.

May sought to strengthen her hand by calling an election for last June, only to shockingly lose her parliamentary majority. It’s left her vulnerable to rebellions by lawmakers who reject her policy of leaving Europe’s single market and reliant on a party from Northern Ireland to pass legislation.

“It’s a reminder that May is not in control of the ship, but there is no successor who commands broad support,” said Wyn Grant, professor of politics at Warwick University in central England. “It gives remainers greater confidence and pushes the possibility of a no-deal scenario even further away.”