Britain’s Supreme Court ruled Tuesday that Prime Minister Boris Johnson’s decision to suspend parliament for five weeks was unlawful and is “void and of no effect.”

The court said in explaining the unanimous decision that Johnson’s prevented parliament from carrying out its role of “holding the government to account.”

It highlighted the special nature of the timing of the suspension, which was to last for five of the eight weeks that remained before the deadline for Britain to exit the European Union.

“This prolonged suspension of Parliamentary democracy took place in quite exceptional circumstances: the fundamental change which was due to take place in the Constitution of the United Kingdom on 31st October,” the court said.  “Parliament, and in particular the House of Commons as the elected representatives of the people, has a right to a voice in how that change comes about.  The effect upon the fundamentals of our democracy was extreme.”

Parliament was due to be out until mid-October under the suspension, but the court ruling Tuesday said leaders can “take immediate steps” to return “as soon as possible.”

FILE – European Commission President Jean-Claude Juncker, left, shakes hands with British Prime Minister Boris Johnson prior to a meeting at a restaurant in Luxembourg, Sept. 16, 2019.

Johnson said respected the Supreme Court decision but didn’t agree with it.

The prime minister has pledged to carry out Brexit whether or not Britain has an agreement in place on the terms of its divorce from the EU.

Shortly before he suspended parliament, Britain’s Queen Elizabeth gave her approval to legislation seeking to block Johnson from going through with the split if there is no agreement.

Johnson came to power after former Prime Minister Theresa May failed three times to get the House of Commons to approve the deal she negotiated with the EU.  European leaders have shown no sign of wanting to open those negotiations again.