The UK's highest court has declared that British Prime Minister Boris Johnson's decision to suspend parliament for five weeks was unlawful.

A panel of 11 justices at the Supreme Court in London gave their decision in a ruling on the legality of the prime minister's advice to Queen Elizabeth to prorogue parliament until 14 October.

The judges, led by the court's president Lady Hale, heard appeals over three days arising out of legal challenges in England and Scotland, which produced different outcomes.

The panel held unanimously that Mr Johnson's advice to the Queen was unlawful because it had the effect of frustrating parliament.

The court also found the prorogation was "void and of no effect", meaning parliament has not been suspended.

Announcing the result, Lady Hale said: "The court is bound to conclude, therefore, that 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."

Read more:

At the High Court in London, the Lord Chief Justice Lord Burnett and two other judges rejected a challenge against the prime minister's prorogation move by campaigner and businesswoman Gina Miller.

But in Scotland, a cross-party group of MPs and peers won a ruling from the Inner House of the Court of Session that Mr Johnson's prorogation decision was unlawful because it was "motivated by the improper purpose of stymieing parliament".

Mrs Miller's barrister Lord Pannick QC, told the court that Mr Johnson's motive for an "exceptionally long" prorogation was to "silence" parliament, and that his decision was an "unlawful abuse of power".

James Eadie QC argued on the prime minister's behalf that the suggestion the prorogation was intended to "stymie" parliament ahead of Brexit was "untenable".

Mr Johnson advised Queen Elizabeth on 28 August to prorogue parliament for five weeks and it was suspended on 9 September.

He claimed the five-week suspension was to allow the government to set out a new legislative agenda in a Queen's speech when MPs return to parliament.

But those who brought the legal challenges argued the prorogation was designed to prevent parliamentary scrutiny of the UK's impending exit from the EU on 31 October.

Speaking to reporters outside the court in Westminster, Ms Miller said the prime minister was not above the law.

"Today is not a win for any individual or cause, it's a win for parliamentary sovereignty, the separation of powers and the independence of our British courts," she said.

"Crucially, today's ruling confirms that we are a nation governed by the rule of law. Laws that everyone, even the prime minister, is not above.

"MPs should turn up for work tomorrow and get on with scrutinising this government.

"The ruling today speaks volumes. This prime minister must open the doors of parliament tomorrow.

"MPs must get back and be brave and bold in holding this unscrupulous government to account."

Former British prime minister John Major, who joined Ms Miller's case, called for Mr Johnson's "unreserved apology".

Mr Major said: "I hope this ruling from the Supreme Court will deter any future prime minister from attempting to shut down parliament, with the effect of stifling proper scrutiny and debate, when its sitting is so plainly in the national interest.

"No prime minister must ever treat the monarch or parliament in this way again."

Joanna Cherry led the case in the Scottish courts

Scottish National Party MP Joanna Cherry, who led the case in the Scottish courts, said Mr Johnson's position was "untenable" and called on him to resign.

"This is an absolutely momentous decision. There is nothing to stop us - members of parliament - resuming immediately the important job of scrutinising this minority Tory government as we hurtle towards Brexit," she told reporters outside the Supreme Court.

"This is a huge victory for the rule of law and for democracy. As regards Mr Boris Johnson, the highest court in the United Kingdom has unanimously found that his advice given to Her Majesty the Queen was unlawful.

"His position is untenable and he should have the guts for once to do the decent thing and resign."

This evening, on RTÉ's Six One, Ms Cherry said the House of Commons needs to get the Benn Act - legislation passed which would force Mr Johnson to go to Brussels and ask for a Brexit extension if no-deal is agreed by 19 October - tied down so it cannot be ignored.

Ms Cherry said once an extension has been achieved moves would be made to remove Mr Johnson from his role as prime minister.