LONDON, England—The supreme court handed down one of the most momentous legal verdicts in British history on Tuesday, ruling that Boris Johnson had broken the law by asking the Queen to shut down Parliament so that he could stifle lawmakers ability to hold him to account.

Johnson had gambled that the courts would ignore his Brexit chicanery; he was wrong. It was a gamble that could make him Britain’s shortest-serving prime minister.

The leader of the opposition called on Johnson to stand down immediately after the prime minister suffered total humiliation in the courts, where his behavior was condemned unanimously by Britain’s 11 most senior judges. Asked by The Daily Beast if Johnson will now be forced to resign over the defeat, a British government minister replied: “Goodness knows.”

Johnson suspended Parliament for five weeks ahead of Britain’s scheduled exit from the EU at the end of October. Lawmakers from every major party in the British Parliament reacted furiously to the move, saying it was intended to prevent scrutiny of Johnson’s Brexit plan. In a bombshell verdict delivered Tuesday morning, judges agreed.

The ruling said there was “no justification” for the suspension, and that: “The effect on the fundamentals of our democracy was extreme.”

It is an unprecedented decision that will permanently rebalance Britain’s mostly unwritten constitution, after the supreme court, which was only established in 2009, asserted its power to hold No. 10 to account.

Johnson, who is in New York at the United Nations General Assembly, now faces an extraordinary and unenviable set of questions over when to return to Parliament, and how to grovel to the Queen.

Asked about the ruling, Johnson refused to apologize and said: “I don't think that it's right, but we will go ahead and of course Parliament will come back ... The important thing is we get on and deliver Brexit on October 31.”

The supreme court went out of its way to avoid ruling on whether Johnson had lied to the Queen or directly misled her, but there can be no doubt that the palace will be furious that Johnson acted unlawfully in advising her to shut down Parliament in a traditional practice known as “proroguing.”

Publicly, Johnson said the shutdown was a routine procedure to prepare for a new Parliament and did not take power out of the hands of Parliament. If he told the Queen the same thing over the phone, he is guilty of the unprecedented deception of Britain’s head of state.

The supreme court’s verdict ruled that the prime minister’s advice was unlawful and, therefore, parliament has not been suspended at all in the eyes of the law. After delivering the historic verdict, Lady Hale, president of the supreme court, urged lawmakers to take “immediate steps” to reconvene Parliament.

Speaker of the House of Commons John Bercow welcomed the ruling in a statement and said Parliament will reconvene Wednesday morning. Just minutes after the ruling was announced, members of Parliament began re-entering the House of Commons.

As the verdict was handed down, there were gasps and cheers in Brighton on England’s south coast, where lawmakers from Britain’s opposition Labour party are holding their annual conference.

Emily Thornberry, the shadow foreign secretary was on stage at an event when the verdict was read out by members of the audience. “What do I do?” she said, throwing her head back in laughter.

As lawmakers debated whether to race to the train station and return to Westminster, Jeremy Corbyn interrupted the program in the main conference hall to demand Johnson step aside. He said: “I invite Boris Johnson in the historic words to consider his position and become the shortest-serving prime minister there’s ever been.”

As the prime minister tried to sound defiant in New York, his authority continued to crumble back home amid recriminations over his high-risk strategy of shutting down parliament.

A former member of Johnson’s Cabinet, Amber Rudd, who quit over the Brexit policy, revealed that the prime minister had not shared legal advice over the prorogation with members of his cabinet.

Conservative lawmaker and former justice secretary David Gauke said the prime minister should formally apologize. “I do think there’s a need for an apology to Parliament,” he told the BBC.

Gauke also turned his fire on Johnson’s chief of staff, Dominic Cummings, who is thought to be behind Johnson’s move to shut down parliament, saying the adviser’s position was now “untenable.”

Nigel Farage, the leader of the Brexit Party, said: “The calling of a Queen’s Speech and prorogation is the worst political decision ever. Dominic Cummings must go.”