LONDON (AP) — Britain’s political opposition on Wednesday demanded that Prime Minister Boris Johnson reverse his suspension of Parliament, after a court ruled that his decision to send lawmakers home less than two months before the U.K. is due to leave the European Union was unlawful.

Judges at Scotland’s highest civil court said the government’s action was illegal “because it had the purpose of stymieing Parliament.” But the Court of Session judges said Britain’s Supreme Court must make the final decision at a hearing next week.

Johnson claims he shut down the legislature this week so that he can start afresh on his domestic agenda at a new session of Parliament next month. But the five-week suspension gives him a respite from rebellious lawmakers as he plots his next move to break the political deadlock over Brexit and lead Britain out of the EU by Oct. 31.

The Scottish judges said “the only inference that could be drawn was that the U.K. government and the prime minister wished to restrict Parliament.”

They ruled that the suspension was “null and of no effect,” but referred the matter to the Supreme Court for resolution. A hearing there is to begin Tuesday.

Opposition politicians urged the government to scrap the suspension and recall lawmakers to Parliament. They were sent home Tuesday despite the objections of House of Commons Speaker John Bercow and opposition lawmakers, who held up signs in the chamber saying “Silenced.”

Labour Party Brexit spokesman Keir Starmer said the court’s ruling was “very rare and it’s very strong.”

“Now I think what Boris Johnson should do is to urgently recall Parliament,” he said.

Lawmaker Dominic Grieve, who was kicked out of the Conservative group in Parliament by Johnson last week after voting against the government, said it was possible the prime minister had misled Queen Elizabeth II — whose formal approval is needed to suspend Parliament — about his motives.

He said if that turned out to be true, the prime minister would have to “resign — and very swiftly.”

The court ruling came after a group of more than 70 opposition lawmakers challenged the government’s decision to prorogue Parliament, until Oct. 14 — just over two weeks before Britain is due to leave the EU.

Last week, a court in Edinburgh rejected the lawmakers’ challenge, saying it was a matter for politicians, not the courts, to decide.

But that was overturned Wednesday on appeal.

Attorney Jolyon Maugham said he believed “that the effect of the decision is that Parliament is no longer prorogued.”

It was unclear what that means in practice. Catherine Haddon, a senior fellow at independent think-tank the Institute for Government, tweeted that the ruling “does not (yet) change the prorogation itself. Though of course will add to pressure.”

The British government said it was disappointed by the decision. In a statement, the government said it “needs to bring forward a strong domestic legislative agenda. Proroguing Parliament is the legal and necessary way of delivering this.”

It noted that another challenge to the suspension, brought by transparency campaigner Gina Miller, was rejected at the High Court in London last week by judges who said the decision was inherently political and “not a matter for the courts.”

Wednesday’s ruling deepens Britain’s political deadlock, with Brexit due in about 50 days.

Johnson says the country must leave the EU on Oct. 31, with or without a divorce deal to smooth the way. But many lawmakers fear a no-deal Brexit would be economically devastating, and are determined to stop him.

Johnson says he wants to strike a new deal with the bloc after the agreement made by his predecessor Theresa May was rejected three times by Britain’s Parliament. But EU officials say the U.K. has made no concrete proposals.

German Chancellor Angela Merkel said Wednesday that “it’s my firm conviction that we still have a chance to achieve this in an orderly way.”

But she told lawmakers in Berlin that Germany is also prepared for a Brexit without a deal that will result in “an economic competitor at our door.”