Scotland's appeal court on Wednesday declared British Prime Minister Boris Johnson's decision to suspend parliament "unlawful", in a case brought by lawmakers and set to be appealed by the government.
The decision overturns a previous Scottish ruling which had paved the way for Johnson to prorogue parliament on Tuesday until October 14 -- just a few weeks before Britain is due to leave the European Union.
However, the government immediately said it would appeal the decision to the supreme court in London.
A lawyer involved in bringing the case in Scotland suggested it may be heard as soon as next Tuesday.
Judges in the Inner House, the supreme civil court in Scotland, ruled that Johnson's advice to the queen to prorogue parliament "was unlawful because it had the purpose of stymying parliament", according to a summary.
The case had been brought by 78 British lawmakers, who accuse Johnson of trying to silence critics of his plan to leave the EU next month without a deal with Brussels.
A government spokesman: "We are disappointed by today’s decision, and will appeal to the UK Supreme Court.
"The UK government needs to bring forward a strong domestic legislative agenda. Proroguing parliament is the legal and necessary way of delivering this."
It noted that a separate case brought at the high court in London last week against prorogation had failed.
A lawyer involved in the Scottish case against the government, Jolyon Maugham, tweeted that it would be considered in Britain's Supreme Court starting on Tuesday.
The court could not be reached for immediate comment.
Suspending parliament to start a new legislative session is normally a routine event that takes place most years.
But Johnson's decision is controversial because it would leave parliament without a voice for five weeks in the run-up to Brexit, with the divorce terms still in doubt.