Boris Johnson’s five-week suspension of parliament has been ruled unlawful by the highest appeal court in Scotland, with a panel of three senior judges concluding that the order to close the doors of Westminster to MPs was therefore "null and of no effect".

In a unanimous decision in Edinburgh’s Court of Session, the judges ruled that the prorogation was unconstitutional, as documents provided by the government itself had shown that its "true purpose" was to stifle parliamentary scrutiny.

In a written ruling, the judges stated that the prime minister's advice to the Queen to shut parliament down until 14 October "was motivated by the improper purpose of stymying parliament and that it, and what has followed from it, is unlawful."

They said that the prime minister's advice on the monarch's exercise of prerogative power would not normally be subject to judicial review, unless its purpose was "to stymie parliamentary scrutiny of the executive, which was a central pillar of the good governance principle enshrined in the constitution".

Thousands protest after Boris Johnson requests to suspend parliament Show all 29 1 /29 Thousands protest after Boris Johnson requests to suspend parliament Thousands protest after Boris Johnson requests to suspend parliament Houses of Parliament An anti-Brexit supporter raises a sign during a protest in front of the Houses of Parliament in central London, Wednesday, Aug. 28, 2019. British Prime Minister Boris Johnson maneuvered on Wednesday to give his political opponents even less time to block a no-deal Brexit before the Oct. 31 withdrawal deadline, winning Queen Elizabeth II's approval to suspend Parliament. (AP Photo/Vudi Xhymshiti) Vudi Xhymshiti AP Thousands protest after Boris Johnson requests to suspend parliament Downing Street Anti-Brexit demonstrators hold placards as they protest outside of Downing Street in London on August 28, 2019. - British Prime Minister Boris Johnson sparked fury Wednesday among pro-Europeans and MPs opposed to a no-deal Brexit by forcing the suspension of parliament weeks before Britain's EU departure date. The pound slid on the surprise news, which opponents branded a "coup" and a "declaration of war" but Johnson claimed was necessary to allow him to pursue a "bold and ambitious" new domestic legislative agenda. (Photo by DANIEL SORABJI / AFP)DANIEL SORABJI/AFP/Getty Images DANIEL SORABJI AFP/Getty Images Thousands protest after Boris Johnson requests to suspend parliament Houses of Parliament Anti-Brexit supporters take part in a protest in front of the Houses of Parliament in central London, Wednesday, Aug. 28, 2019. British Prime Minister Boris Johnson maneuvered on Wednesday to give his political opponents even less time to block a no-deal Brexit before the Oct. 31 withdrawal deadline, winning Queen Elizabeth II's approval to suspend Parliament. (AP Photo/Vudi Xhymshiti) Vudi Xhymshiti AP Thousands protest after Boris Johnson requests to suspend parliament Houses of Parliament to Downing Street TOPSHOT - Anti-Brexit demonstrators hold placards as they take part in a protest march from Britain's Houses of Parliament to Downing Street in London on August 28, 2019. - British Prime Minister Boris Johnson announced Wednesday that the suspension of parliament would be extended until October 14 -- just two weeks before the UK is set to leave the EU -- enraging anti-Brexit MPs. MPs will return to London later than in recent years, giving pro-EU lawmakers less time than expected to thwart Johnson's Brexit plans before Britain is due to leave the European Union on October 31. (Photo by DANIEL SORABJI / AFP)DANIEL SORABJI/AFP/Getty Images DANIEL SORABJI AFP/Getty Images Thousands protest after Boris Johnson requests to suspend parliament Downing Street Anti-Brexit supporters gather outside the Prime Minister's residence 10 Downing Street in London, Wednesday, Aug. 28, 2019. British Prime Minister Boris Johnson asked Queen Elizabeth II on Wednesday to suspend Parliament, throwing down the gauntlet to his critics and causing outrage among opposition leaders who will have even less time to thwart a no-deal Brexit. (AP Photo/Matt Dunham) Matt Dunham AP Thousands protest after Boris Johnson requests to suspend parliament Houses of Parliament LONDON, ENGLAND - AUGUST 28: Pro-EU supporters protest outside the Houses of Parliament on August 28, 2019 in London, England. British Prime Minister Boris Johnson has written to Cabinet colleagues telling them that his government has requested the Queen suspend parliament for longer than the usual conference season. Parliament will return for a new session with a Queen's Speech on 14 October 2019. Some Remain supporting MPs believe this move to be a ploy to hinder legislation preventing a No Deal Brexit. (Photo by Peter Summers/Getty Images) Peter Summers Getty Images Thousands protest after Boris Johnson requests to suspend parliament Houses of Parliament epa07799808 A protestor outside the Houses of Parliament in Westminster, London, Britain, 28 August 2019. The UK government is to suspend Parliament after the summer break, a move that might block MPs from voting against a possible no-deal Brexit.. EPA/WILL OLIVER WILL OLIVER EPA Thousands protest after Boris Johnson requests to suspend parliament Houses of Parliament Anti-Brexit supporters take part in a protest near the Houses of Parliament in central London, Wednesday, Aug. 28, 2019. British Prime Minister Boris Johnson asked Queen Elizabeth II on Wednesday to suspend Parliament, throwing down the gauntlet to his critics and causing outrage among opposition leaders who will have even less time to thwart a no-deal Brexit. (AP Photo/Matt Dunham) Matt Dunham AP Thousands protest after Boris Johnson requests to suspend parliament Whitehall TOPSHOT - Demonstrators hold placards as they protest on Whitehall, near the entrance to Downing Street in London on August 28, 2019. - British Prime Minister Boris Johnson sparked fury Wednesday among pro-Europeans and MPs opposed to a no-deal Brexit by forcing the suspension of parliament weeks before Britain's EU departure date. The pound slid on the surprise news, which opponents branded a "coup" and a "declaration of war" but Johnson claimed was necessary to allow him to pursue a "bold and ambitious" new domestic legislative agenda. (Photo by DANIEL SORABJI / AFP)DANIEL SORABJI/AFP/Getty Images DANIEL SORABJI AFP/Getty Images Thousands protest after Boris Johnson requests to suspend parliament Houses of Parliament Anti-Brexit supporters take part in a protest at College Green near the Houses of Parliament in central London, Wednesday, Aug. 28, 2019. British Prime Minister Boris Johnson maneuvered Wednesday to give his political opponents even less time to block a no-deal Brexit before the Oct. 31 withdrawal deadline, winning Queen Elizabeth II's approval to suspend Parliament. (AP Photo/Matt Dunham) Matt Dunham AP Thousands protest after Boris Johnson requests to suspend parliament Anti-Brexit supporters take part in a protest at College Green near the Houses of Parliament in central London, Wednesday, Aug. 28, 2019. British Prime Minister Boris Johnson maneuvered Wednesday to give his political opponents even less time to block a no-deal Brexit before the Oct. 31 withdrawal deadline, winning Queen Elizabeth II's approval to suspend Parliament. (AP Photo/Matt Dunham) Matt Dunham AP Thousands protest after Boris Johnson requests to suspend parliament Protestors from the European Movement in Scotland hold a walking vigil on the Royal Mile, Edinburgh, to demonstrate against Prime Minister Boris Johnson temporarily closing down the Commons from the second week of September until October 14 when there will be a Queen's Speech to open a new session of Parliament. PRESS ASSOCIATION Photo. Picture date: Wednesday August 28, 2019. See PA story POLITICS Brexit. Photo credit should read: Jane Barlow/PA Wire Jane Barlow PA Thousands protest after Boris Johnson requests to suspend parliament Anti-Brexit supporters shout slogans as they gather outside the Prime Minister's residence 10 Downing Street in London, Wednesday, Aug. 28, 2019. British Prime Minister Boris Johnson asked Queen Elizabeth II on Wednesday to suspend Parliament, throwing down the gauntlet to his critics and causing outrage among opposition leaders who will have even less time to thwart a no-deal Brexit. (AP Photo/Matt Dunham) Matt Dunham AP Thousands protest after Boris Johnson requests to suspend parliament Anti-Brexit supporters take part in a protest at College Green near the Houses of Parliament in central London, Wednesday, Aug. 28, 2019. British Prime Minister Boris Johnson maneuvered Wednesday to give his political opponents even less time to block a no-deal Brexit before the Oct. 31 withdrawal deadline, winning Queen Elizabeth II's approval to suspend Parliament. (AP Photo/Matt Dunham) Matt Dunham AP Thousands protest after Boris Johnson requests to suspend parliament Anti-Brexit supporters take part in a protest at College Green near the Houses of Parliament in central London, Wednesday, Aug. 28, 2019. British Prime Minister Boris Johnson maneuvered Wednesday to give his political opponents even less time to block a no-deal Brexit before the Oct. 31 withdrawal deadline, winning Queen Elizabeth II's approval to suspend Parliament. (AP Photo/Matt Dunham) Matt Dunham AP Thousands protest after Boris Johnson requests to suspend parliament Anti-Brexit supporters gather outside the Prime Minister's residence 10 Downing Street in London, Wednesday, Aug. 28, 2019. British Prime Minister Boris Johnson asked Queen Elizabeth II on Wednesday to suspend Parliament, throwing down the gauntlet to his critics and causing outrage among opposition leaders who will have even less time to thwart a no-deal Brexit. (AP Photo/Matt Dunham) Matt Dunham AP Thousands protest after Boris Johnson requests to suspend parliament Anti-Brexit supporters take part in a protest at College Green near the Houses of Parliament in central London, Wednesday, Aug. 28, 2019. British Prime Minister Boris Johnson maneuvered Wednesday to give his political opponents even less time to block a no-deal Brexit before the Oct. 31 withdrawal deadline, winning Queen Elizabeth II's approval to suspend Parliament. (AP Photo/Matt Dunham) Matt Dunham AP Thousands protest after Boris Johnson requests to suspend parliament Shadow home secretary Diane Abbott addresses protesters outside the Houses of Parliament, London, to demonstrate against Prime Minister Boris Johnson temporarily closing down the Commons from the second week of September until October 14 when there will be a Queen's Speech to open a new session of Parliament. PRESS ASSOCIATION Photo. Picture date: Wednesday August 28, 2019. See PA story POLITICS Brexit. Photo credit should read: Kirsty O'Connor/PA Wire Kirsty O'Connor PA Thousands protest after Boris Johnson requests to suspend parliament epa07799846 Protesters gather outside the Houses of Parliament in Westminster, London, Britain, 28 August 2019. The UK government is to suspend Parliament after the summer break, a move that might block MPs from voting against a possible no-deal Brexit. EPA/WILL OLIVER WILL OLIVER EPA Thousands protest after Boris Johnson requests to suspend parliament Anti-Brexit supporters gather outside the Prime Minister's residence 10 Downing Street in London, Wednesday, Aug. 28, 2019. British Prime Minister Boris Johnson asked Queen Elizabeth II on Wednesday to suspend Parliament, throwing down the gauntlet to his critics and causing outrage among opposition leaders who will have even less time to thwart a no-deal Brexit. (AP Photo/Matt Dunham) Matt Dunham AP Thousands protest after Boris Johnson requests to suspend parliament Anti-Brexit supporters carry a flare near the Cenotaph in central London, Wednesday, Aug. 28, 2019. British Prime Minister Boris Johnson asked Queen Elizabeth II on Wednesday to suspend Parliament, throwing down the gauntlet to his critics and causing outrage among opposition leaders who will have even less time to thwart a no-deal Brexit. (AP Photo/Matt Dunham) Matt Dunham AP Thousands protest after Boris Johnson requests to suspend parliament Anti-Brexit demonstrators hold placards as they protest outside of Downing Street in London on August 28, 2019. - British Prime Minister Boris Johnson sparked fury Wednesday among pro-Europeans and MPs opposed to a no-deal Brexit by forcing the suspension of parliament weeks before Britain's EU departure date. The pound slid on the surprise news, which opponents branded a "coup" and a "declaration of war" but Johnson claimed was necessary to allow him to pursue a "bold and ambitious" new domestic legislative agenda. (Photo by DANIEL SORABJI / AFP)DANIEL SORABJI/AFP/Getty Images DANIEL SORABJI AFP/Getty Images Thousands protest after Boris Johnson requests to suspend parliament Anti-Brexit demonstrators hold placards as they protest outside of Downing Street in London on August 28, 2019. - British Prime Minister Boris Johnson sparked fury Wednesday among pro-Europeans and MPs opposed to a no-deal Brexit by forcing the suspension of parliament weeks before Britain's EU departure date. The pound slid on the surprise news, which opponents branded a "coup" and a "declaration of war" but Johnson claimed was necessary to allow him to pursue a "bold and ambitious" new domestic legislative agenda. (Photo by DANIEL SORABJI / AFP)DANIEL SORABJI/AFP/Getty Images DANIEL SORABJI AFP/Getty Images Thousands protest after Boris Johnson requests to suspend parliament LONDON, ENGLAND - AUGUST 28: Pro-EU supporters protest outside the Houses of Parliament on August 28, 2019 in London, England. British Prime Minister Boris Johnson has written to Cabinet colleagues telling them that his government has requested the Queen suspend parliament for longer than the usual conference season. Parliament will return for a new session with a Queen's Speech on 14 October 2019. Some Remain supporting MPs believe this move to be a ploy to hinder legislation preventing a No Deal Brexit. (Photo by Peter Summers/Getty Images)(Photo by Peter Summers/Getty Images) Peter Summers Getty Images Thousands protest after Boris Johnson requests to suspend parliament Anti-Brexit supporters continue to participate in a late evening protest in front of the Houses of Parliament in central London, Wednesday, Aug. 28, 2019. British Prime Minister Boris Johnson maneuvered on Wednesday to give his political opponents even less time to block a no-deal Brexit before the Oct. 31 withdrawal deadline, winning Queen Elizabeth II's approval to suspend Parliament. (AP Photo/Vudi Xhymshiti) Vudi Xhymshiti AP Thousands protest after Boris Johnson requests to suspend parliament London metropolitan police talk with anti-Brexit supporters in front of the Houses of Parliament in central London, Wednesday, Aug. 28, 2019. British Prime Minister Boris Johnson maneuvered on Wednesday to give his political opponents even less time to block a no-deal Brexit before the Oct. 31 withdrawal deadline, winning Queen Elizabeth II's approval to suspend Parliament. (AP Photo/Vudi Xhymshiti) Vudi Xhymshiti AP Thousands protest after Boris Johnson requests to suspend parliament LONDON, ENGLAND - AUGUST 28: A Pro-EU supporter raises her fist during a protest outside the Houses of Parliament on August 28, 2019 in London, England. British Prime Minister Boris Johnson has written to Cabinet colleagues telling them that his government has requested the Queen suspend parliament for longer than the usual conference season. Parliament will return for a new session with a Queen's Speech on 14 October 2019. Some Remain supporting MPs believe this move to be a ploy to hinder legislation preventing a No Deal Brexit. (Photo by Peter Summers/Getty Images) Peter Summers Getty Images Thousands protest after Boris Johnson requests to suspend parliament LONDON, ENGLAND - AUGUST 28: Pro-EU supporters protest outside the Houses of Parliament on August 28, 2019 in London, England. British Prime Minister Boris Johnson has written to Cabinet colleagues telling them that his government has requested the Queen suspend parliament for longer than the usual conference season. Parliament will return for a new session with a Queen's Speech on 14 October 2019. Some Remain supporting MPs believe this move to be a ploy to hinder legislation preventing a No Deal Brexit. (Photo by Peter Summers/Getty Images)(Photo by Peter Summers/Getty Images) Peter Summers Getty Images Thousands protest after Boris Johnson requests to suspend parliament LONDON, ENGLAND - AUGUST 28: Pro-EU supporters protest outside the Houses of Parliament on August 28, 2019 in London, England. British Prime Minister Boris Johnson has written to Cabinet colleagues telling them that his government has requested the Queen suspend parliament for longer than the usual conference season. Parliament will return for a new session with a Queen's Speech on 14 October 2019. Some Remain supporting MPs believe this move to be a ploy to hinder legislation preventing a No Deal Brexit. (Photo by Peter Summers/Getty Images)(Photo by Peter Summers/Getty Images) Peter Summers Getty Images

In a damning conclusion, which amounts to a rejection of Mr Johnson's claim that the prorogation was nothing to do with Brexit but purely in order to allow time to prepare for a Queen's Speech, the ruling stated: "The circumstances in which the advice was proffered and the content of the documents produced by the respondent demonstrate that this was the true reason for the prorogation."

It said: "The court will accordingly make an order declaring the prime minister's advice to HM the Queen and the prorogation which followed thereon was unlawful and is thus null and of no effect."

The SNP 's Tommy Sheppard and Joanna Cherry say their 'next move is to demand the recall of parliament'

One of the 78 MPs who brought the case, the Scottish National Party’s Joanna Cherry, called for an immediate recall of parliament, which was dramatically shut down by the prime minister in the early hours of Tuesday.

And she was backed by Scottish first minister Nicola Sturgeon, who said: "Today’s Court of Session judgment is of huge constitutional significance - but the immediate political implications are clear. Court says prorogation was unlawful and null and void - so Parliament must be recalled immediately to allow the essential work of scrutiny to continue."

Anti-Brexit barrister Jolyon Maugham QC, who was a petitioner in the case, said he believed the effect of the decision was that "parliament is no longer prorogued".

Ms Cherry - also a QC - said: "We feel completely vindicated. I feel confident the Supreme Court will uphold this decision.

"This was a plot by Boris Johnson and Jacob Rees-Mogg and others to prevent us representing our constituents' views, prevent us scrutinising them as they take us through a back-door Brexit."

“Parliament should be immediately reconvened,” said SNP MP Tommy Sheppard. “The prime minister should come back to face the music.”

Shadow Brexit secretary Sir Keir Starmer was informed of the ruling after giving a speech to the TUC in Brighton and declared: "I'd better get back to London."

Sir Keir vowed to "get Boris Johnson back in parliament" to hold him to account over Brexit.

He told delegates: "It was obvious to everybody that not only was shutting down parliament at this crucial time obviously, the wrong thing to do, we should be sitting each and every day to resolve this crisis."

A UK government spokesman 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.”

The office of Commons Speaker John Bercow said that it would be for the government to recall parliament if that proved necessary during prorogation.