- Video report by ITV News Political Correspondent Carl Dinnen
The Supreme Court will rule as "soon as it humanly can" over whether Boris Johnson's decision to suspend parliament was lawful.
Closing the hearing, president of the Court, Lady Hale, said the court hoped to be able to publish its decision "early next week".
But she cautioned once more that the 11 judges were not ruling on when or on what terms the UK should leave the European Union.
"We are solely concerned with the lawfulness of the prime minister's decision to advise Her Majesty to prorogue parliament on the dates in question," she said.
She acknowledged this was "not a simple question" but recognised time was pressing, adding the court hoped to be able to publish its decision early next week.
Lady Hale had earlier told the court that the judges would move as quickly as possible in reaching a decision.
Summing up the government's case, Advocate General for Scotland, Lord Keen QC, said the issue of prorogation was "a matter between the executive and Parliament", adding that if Parliament "takes exception" to actions of the executive "they have the tools available", namely a motion of no confidence.
He said: "How in the context of that political minefield is the court to opine on the issue of purpose or improper purpose, or legitimate political purpose or illegitimate political purpose? How are these concepts to be defined and applied in this context?
"In my respectful submission, the applicants and the petitioners are inviting the court into forbidden territory and into what is essentially a minefield, an ill-defined minefield."
However, in answer, Lord Pannick, representing campaigner Gina Miller, argued there was no need for an "incendiary" ruling, and urged the judges to look at the documents, in which Boris Johnson writes about prorogation being nothing more than than a "rigmarole to show MPs earn their crust".
He said: "I invite the court to consider the long prorogation was motivated or at least strongly influenced by the prime minister's desire to prevent scrutiny."
He added that the lengthy suspension would have an "adverse effect on the ability of Parliament to perform its scrutiny functions at this critical time".
He also suggested it could be for the court to give an indication of what should happen next, if the judges supported the lower court's original decision.
The court began the day hearing argument on behalf of former prime minister Sir John Major who believed Boris Johnson's decision to suspend parliament has ulterior "political interest".
Sir John's lawyer, Lord Garnier QC, questioned the legitimacy behind Mr Johnson's proroguing of parliament at a "time-critical period" before the Brexit deadline.
Lord Garnier said the intervention has "nothing to do with the arguments for or against Brexit".
Lord Garnier said the government documents do not explain why the length of prorogation should be five weeks long, adding "the inference must be that there must be some other factor” must have influenced the decision.
He added: "Where the effect of the prorogation is to prevent Parliament from discharging its role during a time-critical period, there is no possibility of meaningful political control of that decision until after the damage has been done."
In written submissions by the government for the reasons behind the decision to suspend parliament, Lord Garnier said they could not be "complete" and "true".
Sir John argued that the "inescapable inference to be drawn is that the prorogation is to prevent parliament from exercising its right to disagree with government".
The highest court in the UK has also heard evidence from the Scottish and Welsh Governments, along with evidence from Northern Irish victims’ campaigner Raymond McCord.
Mr McCord, whose son was murdered by loyalist paramilitaries in 1997, brought separate legal proceedings in Belfast arguing that a no-deal Brexit would damage the Northern Ireland peace process.
Lord Advocate James Wolffe QC, giving evidence on behalf of the Scottish government, told judges the prorogation was taking place during a "time-critical period" when the decision is likely to have "momentous consequences".
Mr Wolffe said that, "irrespective of its purpose", any suspension of Parliament called for the "most cogent justification" and required the court to subject the decision to "rigorous and searching review".
Ronan Lavery QC, representing Mr Cord, was told by the Justices that his submissions were "not relevant".
He was questioned whether prorogation's specific impact on Northern Ireland and the legal implications of that - but his submissions were dismissed as a complaint about Brexit.
As Mr Lavery referenced the Yellowhammer report, which looked at the effects of Brexit on the UK, one of the judges said the effects of how Britain leaves the EU are "completely irrelevant to the legal questions" which would impact on the ruling.
Lawyers representing the Welsh Government will say Mr Johnson’s actions have “impeded” parliamentary sovereignty, while Holyrood’s legal team will submit the prorogation will have a “profoundly intrusive effect” on Parliament’s ability to scrutinise the executive branch of the Government.
The court has also received written submissions from shadow attorney general Baroness Chakrabarti.
The justices are hearing appeals arising from earlier rulings in which leading judges reached different conclusions.
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 Mrs 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 is now appealing against the decision of the High Court, asking the Supreme Court to find that the judges who heard her judicial review action “erred in law” in the findings they reached.
Sir James Eadie QC argued on the Prime Minister’s behalf on Wednesday that the suggestion the prorogation was intended to “stymie” Parliament ahead of Brexit is “untenable”.
The justices are also being asked by the Westminster Government to allow an appeal against the decision in Scotland.
The Prime Minister advised the Queen on August 28 to prorogue Parliament for five weeks and it was suspended on September 9.
Mr Johnson says the five-week suspension is to allow the Government to set out a new legislative agenda in a Queen’s Speech when MPs return to Parliament on October 14.
But those who brought the legal challenges argue the prorogation is designed to prevent parliamentary scrutiny of the UK’s impending exit from the EU on October 31.
It is not known when the court is expected to give its ruling.
During a brief discussion on Wednesday about what order the court should make in the event it concludes the prorogation was unlawful, Lord Reed said the issue could be a “very difficult question” for the judges.