Mr. Johnson, determined to make a break from Europe by the end of next month whatever the cost, had maneuvered to cut out the lawmakers, many of whom opposed his damn-the-torpedoes approach, in the weeks before the deadline to withdraw from the union.
But the British Supreme Court ruled unanimously that the prime minister had overstepped, and effectively declared Parliament back in session. As lawmakers prepared to reconvene on Wednesday, Mr. Johnson, facing calls to resign, said he would cut short a trip to the United Nations and return home.
The ruling was more than just another political blow to a leader who has suffered more than his share of setbacks. It was a seminal legal moment in Britain, where the courts have historically steered clear of political disputes, and vivid evidence of how the anguished debate over Brexit has strained Britain’s most hallowed public institutions.
Most immediately, the ruling raised questions about the future of Mr. Johnson, who was already reeling after multiple defeats in Parliament, a rebellion in his own Conservative Party, and new questions about his ties to a young businesswoman when he was mayor of London.
Speaking before a meeting with President Trump at the United Nations, Mr. Johnson said he disagreed “profoundly” with the ruling and would forge ahead with his plans to leave the bloc. But he added, “Let’s be absolutely clear, we respect the judiciary in our country, we respect the court.”
Mr. Trump, who has cultivated Mr. Johnson as a like-minded populist, played down the significance of the decision. Noting that he had lost several cases in the United States Supreme Court before gaining some victories, Mr. Trump said, “For him, it’s another day in the office.”
Still, the debate over whether and how to leave the European Union, which voters agreed to do in a June 2016 referendum, proved the undoing of Mr. Johnson’s two predecessors as divided Britons took to the street to protest. Now, he faces an uncertain future as he ventures back into Parliament.
A Slain Jewish Girl’s Diary of Life Under the Soviets and the Nazis
Wishing the World Could Be More Soft
On Tuesday, at the same time the prime minister was meeting with Mr. Trump, Jeremy Corbyn, the leader of the Labour Party, told a cheering audience at his party’s conference that Mr. Johnson had “misled the country” and would soon become “the shortest-serving prime minister there’s ever been.”
Mr. Johnson reiterated his call for a general election, but there were no signs he was any closer to winning the necessary two-thirds approval in Parliament to schedule a vote. Parliament seemed likely to lapse back into paralysis as the deadline for Britain’s exit from the European Union — Oct. 31 — draws closer.
Defenders of the prime minister complained that the court ruling would weaken his hand in negotiating an exit deal with Brussels. That contention seemed debatable, given the deep gulf between the two sides, but the court’s decision certainly tarnishes him at home, at a time when his other stumbles have yet to dent his popularity.
Unlike in the United States, there is little precedent in Britain for judicial review of government decisions. That had led political and legal analysts to speculate that the court might decide it had no authority to rule on the prime minister’s actions, or to deliver a limited rebuke.
Instead, the court’s 11 justices cast aside this tradition of restraint and delivered an unsparing denunciation of the government’s actions, and an unequivocal victory for the prime ministers’ opponents.
“The decision to advise Her Majesty to prorogue Parliament was unlawful because it had the effect of frustrating or preventing the ability of Parliament to carry out its constitutional functions without reasonable justification,” said the court’s president, Baroness Brenda Hale, using the British term for suspending the body.
“The prime minister’s advice to Her Majesty was unlawful, void and of no effect,” she said, declaring that Parliament was no longer suspended.
But with so many forces at play, members of Parliament were uncertain how the situation might unfold when the House of Commons went back into session.
The speaker of the House of Commons, John Bercow, said the chamber would meet Wednesday, nearly three weeks earlier than the date Mr. Johnson had set.
Mr. Bercow, who has been a thorn in the government’s side because of his habit of allowing backbenchers to influence the debate over Brexit, said the justices “have vindicated the right and duty of Parliament to meet at this crucial time to scrutinize the executive and hold ministers to account.”
“As the embodiment of our parliamentary democracy,” he said, “the House of Commons must convene without delay.”
While the lawmakers scrambled to plot strategy for their unexpected parliamentary session, legal analysts pored over the court’s written opinion to determine just how much it changed the landscape of British constitutional law. On first glance, the answer seemed to be: a great deal.
“It’s striking and unprecedented and will send a shock wave through the U.K.’s democratic institutions,” said Raphael Hogarth, an associate at the Institute for Government, a research group.
“There are some aspects of Parliament’s role in holding the executive to account that we previously thought were just established practice, or perhaps convention,” Mr. Hogarth said. “But what the Supreme Court has done today is rolled them into legal doctrine.”
Mr. Johnson’s next move was not clear, and he did not rule out suspending Parliament again. While he professed respect for the courts, he complained that the decision reflected the views of those who opposed Brexit — and, by implication, the will of the British people, who voted narrowly to leave the bloc.
“I think the most important thing is that we get on and deliver Brexit on Oct. 31, and clearly the claimants in this case are determined to try to frustrate that,” Mr. Johnson told reporters.
Experts have warned that a British withdrawal from the bloc without a formal agreement with the European Union could do serious damage to the economy.
Mr. Johnson has absorbed an extraordinary string of legal and political defeats since becoming prime minister in July. He lost a succession of Parliamentary votes, lost his majority in the House of Commons and lost the support of several members of his Conservative Party — including his own brother.
A new threat emerged over the weekend, when The Sunday Times of London reported that when Mr. Johnson was mayor of London, his office directed government grants and coveted spots in trade delegations to an entrepreneur, a young woman, whose apartment it said he often visited during working hours.
The legal challenges to Mr. Johnson’s suspension of Parliament had begun almost immediately.
This month, an English court ruled that the judiciary could not pass judgment on how or why Mr. Johnson had acted. But days later, Scotland’s highest civil court ruled that the suspension was an unlawful effort to stymie debate before the Brexit deadline, which Mr. Johnson has pledged to meet even if London and Brussels do not reach an agreement on the terms of a British withdrawal.
On Tuesday, the Supreme Court ruled that Mr. Johnson’s action was unjustified and that his motive did not matter.
The timing of Parliament’s return is doubly bad for Mr. Johnson because the Conservatives are scheduled to hold their annual conference early next week to showcase the party’s policies ahead of a possible general election. Unless the prime minister can assemble an unlikely majority to suspend Parliament again, that set-piece event may now clash with parliamentary proceedings.
Mr. Johnson planned to cut short his New York trip and fly back to London on Tuesday night, after deliberating by phone with his cabinet, government officials said.
The next-to-last speaker at the United Nations General Assembly on Tuesday, Mr. Johnson conspicuously avoided talking about the political earthquake at home. Rather, in what seemed like an improvised address, he warned of the consequences of technology created without ethical underpinnings, likening it to the story of Prometheus in Greek mythology, who is punished for his transgressions by an eagle that repeatedly eats his liver.
“And this went on forever — a bit like the experience of Brexit in the U.K., if some of our parliamentarians had their way,” Mr. Johnson joked, in his one reference to Britain’s chaos.
As a practical matter, it was not clear how much the court decision would change the government’s immediate approach to Brexit. In the days before they were dispersed, members of the House of Commons pushed through a law — over the prime minister’s fierce opposition — that would prohibit Mr. Johnson from pursuing a “no-deal Brexit.”
In symbolic terms, though, the court ruling was a stinging rebuke. It raised the question of whether he had misled the queen in asking her to suspend Parliament. And it added to the perception that his government was willing to run roughshod over Britain’s political conventions in its zeal to extract the country from Europe.
Before his meeting with Mr. Trump, an American reporter asked Mr. Johnson if he planned to resign because of his handling of the matter.
“That was a very nasty question,” Mr. Trump interjected.
Mr. Johnson, however, was more understanding.
“I think he was asking a question, to be fair, that a lot of British reporters would have asked,” he said.