Boris Johnson's attorney general, Geoffrey Cox, faces embarrassment after his advice saying suspending parliament was lawful was leaked to Sky News.
Last month a Scottish court released the minutes of the telephone conference call between cabinet ministers, with certain sections redacted.
Sky News has been leaked the text of one of the redacted sections, which reveals that Mr Cox said it was lawful and anyone disputing this was doing so for political reasons.
The unredacted version of the copy says: "The attorney general said that his advice on the question of the law is that this was lawful and within the constitution.
"Any accusations of unlawfulness or constitutional outrage were motivated by political considerations. The proposal was compatible with the provisions of the NIEFF 2019."
However, the Supreme Court found today that Mr Cox was wrong in a unanimous judgment.
This calls into question the advice, and heaps pressure on Mr Cox.
The issue of the lawfulness of the prorogation has unnerved cabinet ministers.
Julian Smith, the Northern Ireland secretary, had pushed Mr Johnson to see a more detailed legal assessment but this never emerged.
This is the second leak of redacted text to Sky News, with the prime minister's claim that his predecessor David Cameron was a "girly swot" also being revealed.
Downing Street did not comment, but a spokeswoman for the attorney general's office said the government acted in "good faith" and believed prorogation was "both lawful and constitutional".
Labour's Sir Keir Starmer said the attorney general should "consider his position" and "at the very least" make a statement to MPs.
"I think it's very important that we see the full legal advice on this," the shadow Brexit secretary told Sky News.
The Supreme Court ruled earlier on Tuesday that Mr Johnson's suspension of parliament was unlawful.
Eleven justices were asked to determine the legality of Mr Johnson's advice to the Queen to prorogue parliament, for what opponents described as an "exceptionally long" period.
The panel held unanimously that Mr Johnson's advice was unlawful because it had the effect of frustrating parliament.
In New York, Mr Johnson said that it was a ruling that "we shall respect... we will go ahead and of course parliament will come back".
He added: "I have the upmost respect for our judiciary, I don't think this was the right decision. I think that the prorogation has been used for centuries without this kind of challenge.
"There are a lot of people who want to frustrate Brexit. There are a lot of people who want to stop this country coming out of the EU."
The Supreme Court also found the prorogation was "void and of no effect" - meaning parliament has not been suspended.
Lady Hale said: "The court is bound to conclude therefore that the decision to advise Her Majesty to prorogue was unlawful because it had the effect of frustrating or preventing the ability of parliament to carry out its constitutional functions."
Labour leader Jeremy Corbyn told his party's conference in Brighton: "It shows the prime minister has acted unlawfully in shutting down parliament.
"It demonstrates a contempt for democracy and an abuse of power by him."
Following the decision, Speaker John Bercow said the House of Commons was preparing to resume on Wednesday from 11.30am.
Mr Bercow said there would be no Prime Minister's Questions but there would be scope for urgent questions, ministerial statements and emergency debate applications.
Mr Johnson had insisted the five-week suspension from 9 September 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 legal challenges accused the PM of an unlawful "abuse of power" and argued that the prorogation was designed to prevent parliamentary scrutiny of the UK's impending exit from the EU on 31 October.
The cases against the government were brought by campaigner and businesswoman Gina Miller and a cross-party group of MPs and peers.
SNP MP Joanna Cherry, who led the case in the Scottish courts, said: "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."