A placard reading “We Demand A People's Vote” sits next to a beret decorated with the European Union flag design during a Best For Britain and People's Vote rally in London, Dec. 9, 2018. (Simon Dawson/Bloomberg)

The European Union’s highest court ruled Monday that Britain could unilaterally reverse its decision to split from the 28-nation political bloc, a verdict that gave a boost to anti-Brexit campaigners.

The decision, which came a day before the British Parliament was scheduled to vote on Prime Minister Theresa May’s deeply unpopular Brexit deal, made clear Britain has the ability to reverse itself any time before the March 29 deadline to leave the European Union. A legal question had arisen about whether a reversal would require the consent of the other 27 E.U. members, but the binding decision made clear that little stands in London’s way — should it want to return to the E.U. fold.

“The United Kingdom is free to revoke unilaterally the notification of its intention to withdraw from the E.U.,” the European Court of Justice said in its announcement.

The court ruling added to the tumult surrounding the Brexit deal, which has attracted little support from Britain’s warring political factions.

The British Parliament was scheduled to vote on the deal Tuesday ahead of a summit of E.U. leaders in Brussels later this week, but May pulled the plug on the decision hours after the court ruling, facing an embarrassing defeat and a rebellion among her own Tory ranks. Instead, May said, she would travel to Brussels to try to win more concessions from the European Union.

The deal, which was unveiled last month and obeys the red lines set out by May and E.U. negotiators, has attracted little support in Britain. Pro-Brexit hard-liners say it keeps their country unacceptably entangled inside the E.U. market. Pro-E. U. campaigners say it would inflict major harm on the British economy and strip Britain’s voice in European decision-making while offering little benefit to the country.

The British government said in a statement the ruling did not change their plans to pull Britain out of the European Union.

“This does not change the government’s firm policy,” the statement said. “The British people gave a clear instruction to leave, and we are delivering on that instruction.”

The decision fueled demands in Britain for a second referendum that could reverse the June 2016 vote to leave the European Union.

The court rejected arguments from both the British government and the European Commission that other countries would need a say in the reversal. The ruling also said if E.U. leaders grant Britain an extension after March 29 to keep negotiating, the British about-face could take place during that time, too.

The European Commission also said the ruling changed little about its Brexit planning.

“This deal is the best and only deal possible. We will not renegotiate,” said Mina Andreeva, a European Commission spokeswoman. She said the European Union was still planning for Britain’s membership to end next March.

But British advocates for remaining in the European Union reveled in the decision.

“It’s a huge and game-changing moment, clarifying definitively that the British people have real choices about Brexit — and that we can still determine our own destiny,” wrote two pro-E. U. British members of Parliament, Chris Leslie and Tom Brake, in an opinion piece published on HuffPost UK.

Scottish First Minister Nicola Sturgeon, who has warned she could try to lead Scotland out of the United Kingdom and back into the European Union, also embraced the ruling.

“So an extension of Article 50 to allow time for another vote, followed by revocation of Article 50 if the outcome is Remain seems to be an option that is now open to the House of Commons,” she wrote on Twitter. She referred to the section of the Treaty on European Union that allows any member to leave the bloc and establishes a two-year clock to do so.

Even though the ruling eased the way for Britain to stay in the European Union, it was unlikely to be welcomed wholeheartedly by pro-E. U. leaders in countries such as France and Germany. European leaders are frustrated after more than two years of what they see as British-generated political chaos.

Leaders have previously said if Britain remained an E.U. member, they would like to take away the list of opt-outs and rebates British leaders had demanded over decades. The court ruling would allow all of that to stay in place.

Still, some E.U. leaders quickly welcomed the ruling.

“I would be more than happy to see UK staying in the European Union,” Latvian Foreign Minister Edgars Rinkevics wrote on Twitter. He called the court’s decision a “very important ruling.”

The prospects of a reversal in Britain remain unclear. May has declared herself firmly committed to Brexit. Her Conservative Party is split. But the opposition Labour Party also has mixed feelings about Brexit, and party leader Jeremy Corbyn has said he wants a different, softer Brexit — as opposed to no Brexit at all.

Quentin Ariès contributed to this report.