British Prime Minister Boris Johnson's decision to suspend parliament was unlawful, the Supreme Court of the United Kingdom said in its landmark ruling on Tuesday.
Johnson suspended - or prorogued - Parliament for five weeks earlier this month, saying it was to allow a Queen's Speech to outline his new policies.
But the court said it was wrong to stop Parliament carrying out its duties in the run-up to the Brexit deadline on 31 October.
Downing Street said it was "currently processing the verdict".
Delivering its conclusions, the Supreme Court's president, Lady Hale, said: "The effect on the fundamentals of our democracy was extreme."
She added: "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."
Lady Hale said the unanimous decision of the 11 justices was that Parliament had not been prorogued - the decision was null and of no effect - and it was for the Speakers of the Commons and Lords to decide what to do next.
Commons Speaker John Bercow welcomed the ruling and said Parliament "must convene without delay", adding that he would now consult party leaders "as a matter of urgency".