The matter will now be sent to the Supreme Court – the highest court in the land – to be decided on with the final judgement expected to have major ramifications, both for Mr Johnson and the nation.
Remainer MPs responded to the court’s decision today by demanding that Mr Johnson recall Parliament to allow them to scrutinise the government’s Brexit plans.
But Number 10 has insisted it will wait for the Supreme Court to rule and has reiterated its belief that ‘proroguing Parliament is legal and necessary’.
Here’s all of the key questions about the Brexit legal challenge answered.
How many legal challenges has the government faced over Brexit?
Remainers have been pushing three separate legal challenges to the PM’s move to prorogue Parliament.
They have been taking place in the UK’s three legal jurisdictions – England and Wales, Scotland and Northern Ireland.
All of them are broadly similar in that they challenge the legality of Mr Johnson’s decision to send MPs home for five weeks until October 14.
Boris Johnson, pictured at a London school yesterday, took a Brexit body blow today as the Court of Session in Scotland ruled prorogation was unlawful
SNP MP Joanna Cherry, pictured centre in Edinburgh today, who has been heavily involved in the legal challenge described the ruling as ‘historic’ and ‘fantastic’
The suggestion is that the move could be unlawful because it stops MPs scrutinising the government’s Brexit plans despite the fact that the departure date is now just 50 days away.
A ruling is due in the Belfast case tomorrow.
What exactly is the Scottish court case about and what happened today?
A group of more than 70 Remain-backing MPs and peers challenged the prorogation decision in the Court of Session – the highest civil court Scotland.
An initial hearing rejected the case brought by the Remainers but today that was overturned as three Scottish judges said the PM’s decision was in fact unlawful.
The judges said that they had concluded that it was within their power to rule on the prorogation issue and that they had unanimously decided that Mr Johnson’s decision to suspend Parliament had been ‘motivated by the improper purpose of stymying Parliament’.
They said that suspension was a ‘tactic to frustrate Parliament’ and stop MPs from holding the government’s feet to the fire as the Brexit crunch loomed.
The judges suggested that Mr Johnson had failed to adequately demonstrate that prorogation was actually driven by the need for the government to formulate its domestic legislative plans ahead of a new Queen’s Speech – his publicly stated position.
What does the ruling actually mean?
It represents a major spanner in the works for Mr Johnson because it suggests his decision to suspend Parliament should not have gone ahead.
Remainer MPs immediately seized on the ruling and demanded that the Prime Minister recall Parliament immediately.
However, the legal effect of what was announced today, while significant, does not compel Mr Johnson to act straight away because the government has appealed to the Supreme Court which will start examining the Scottish ruling next Tuesday.
Nine Supreme Court Justices are expected to sit for the case, with deliberations expected to last three days.
That means Westminster will have to wait to find out whether Parliament will be recalled – a power that rests with the PM and the PM alone.
What is the government saying?
The government is adamant that it has acted correctly and that what Mr Johnson has done is perfectly legal.
The government’s argument is based on the belief that proroguing Parliament is standard practice for new administrations as they prepare and then set out their domestic priorities at a Queen’s Speech.
While opposition MPs have bemoaned the length of the suspension – five weeks – the government has been quick to point out that the time away from Parliament is only four or five days more than what had been expected as part of the standard party conference recess.
A UK government spokesperson said: ‘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.’
A Downing Street source had sparked controversy this morning after they said campaigners ‘choose the Scottish courts for a reason’.
That comment was seen as an attack on the impartiality of the Scottish judges and sparked a wave of criticism.
Mr Johnson’s spokesman later insisted the PM ‘respects the independence of the judiciary’.
What about the opposition?
Remain-backing MPs are gleeful at the ruling and have demanded Parliament resume sitting immediately.
Jeremy Corbyn, the Labour leader, said: ‘It is a landmark ruling when a court, this time in Scotland, rules that it is unlawful to prorogue Parliament. The issue will now go to the Supreme Court next week.
‘We did everything we could to prevent the prorogation of Parliament.’
Nicola Sturgeon, the SNP leader, told Mr Johnson to bring MPs back to Westminster as she said: ‘We’ve got a court saying the advice that went to the Queen was unlawful. That is extraordinary.’
A number of MPs in Westminster then proceeded to take selfies in the Commons chamber to show that they are ready and willing to go back to work.
Is Scottish law different to the law in England and Wales? And what about Northern Ireland?
To a degree, yes. Scottish law has been distinct from English law for centuries, and differs in a number of important respects.
For example, juries in criminal trials have 15 members – and as well as ‘guilty’ and ‘not guilty’, they can find a case ‘not proven’.
Northern Ireland law has been distinct since partition in 1921, but is more similar to that in England and Wales.
Labour MPs Kevin Brennan (left) and Jonathan Reynolds (right) went to the Commons chamber today to insist that it should still be sitting
What have other courts said about prorogation?
Last week the High Court in London rejected an application for a judicial review of Mr Johnson’s decision brought forward by anti-Brexit campaigner Gina Miller and supported by Labour and Sir John Major.
The court decided that the case was outside the scope of their powers and pointed to the long standing principle that government matters and court matters should be kept separate.
The High Court said courts should be ‘slow to intrude’ on political matters.
What happens next?
If the Supreme Court upholds the Court of Session ruling it will spark a major constitutional row.
Mr Johnson will face intense pressure to recall Parliament. There would also likely be growing calls for him to resign over allegations that he misled or gave bad advice to the Queen who signed off on prorogation on the basis of the advice of ministers.
Meanwhile, Brexiteers will almost certainly accuse the judges of interfering in matters that do not concern them.
If the court overturns the ruling then prorogation will continue as planned with MPs due back at work in Westminster on October 14.
How did we get to this point?
Mr Johnson’s decision to prorogue Parliament for five weeks at a key pre-Brexit time for the country followed a well-trodden constitutional path.
The decision to shut down the legislature is ultimately taken by the Queen, but on the advice of the prime minister of the day and the Privy Council.
What happens next in the Brexit crisis?
Here is how the coming weeks could pan out:
September 14-17: Lib Dem conference takes place in Bournemouth
September 17: Supreme Court hears case on whether prorogation of Parliament was illegal.
September 21-25: Labour conference in Brighton
September 29-October 2: Tory conference takes place in Manchester, with Mr Johnson giving his first keynote speech as leader on the final day. This will be a crucial waypointer on how Brexit talks are going.
October 14: Unless it has already been recalled following the court battle, Parliament is due to return with the Queen’s Speech – the day before Mr Johnson had hoped to hold a snap election.
October 17-18: A crunch EU summit in Brussels, where Mr Johnson has vowed he will try to get a Brexit deal despite Remainers ‘wrecking’ his negotiating position.
October 19: If there is no Brexit deal by this date Remainer legislation obliges the PM to beg the EU for an extension to avoid No Deal.
October 21: Decisive votes on the Queen’s Speech, which could pave the way for a confidence vote.
October 31: The current deadline for the UK to leave the EU.
November/December: An election looks inevitable, but Labour is hinting it might push the date back towards Christmas to humiliate the PM.
The monarch spoke with Mr Johnson by telephone before Commons Leader Jacob Rees-Mogg flew to Balmoral at the end of August to present the Government’s plan in person.
She gave the Government a short window in which to carry out the prorogation and the decision was taken to enact it on Monday this week, after the PM made one last (failed) attempt to convince MPs to back his plea for a general election in October.
The pageantry involved in prorogation led to chaotic scenes in the Commons in the early hours of Tuesday when opposition MPs tried to stop Speaker John Bercow accompanying Black Rod to the Lords, where the proclamation was read out and officially enacted.
How likely is it that Mr Johnson will have to recall Parliament?
This remains in the balance and hinges entirely on what the Supreme Court decides.
The decision of the nine judges in London will carry full political and legal weight.
As the court of last resort, if it upholds the ruling that Mr Johnson’s advice to the Queen was unlawful it would effectively declare the current shutdown null and void.
It is unclear exactly what would happen next – as Parliament would resume sitting, but the Government has not tabled any business.
It would represent a hammer blow to Mr Johnson’s premiership.