The government was forced to publish the legal advice from the Attorney General on the controversial Brexit deal.

The six-page letter was published the day after MPs voted by 311 to 293 to find the government in contempt of Parliament for its failure to reveal the contents. The Attorney General, Geoffrey Cox QC, had previously published an overview, but argued that disclosing the full advice would compromise client confidentiality and be against the national interest.

The ministerial code states that neither the fact that the law officers have given advice, nor its content, may be disclosed outside government without ministers’ consent.

Andrea Leadsom, Leader of the House of Commons urged referral to the Privileges Committee for consideration of the motion in its ‘full constitutional and historical context’.

But lawyers were divided over the issue. The former Solicitor General, Lord Garnier QC, told BBC Radio 4’s Today programme: ‘It is a matter of convention that the law officers don’t disclose their advice – and it used to be the convention that they don’t disclose whether they had given advice on a particular issue.’

In The Guardian human rights barrister Geoffrey Robertson QC wrote: ‘There is no political “convention” more misguided and less examined than the supposed rule that legal advice to ministers must remain confidential.’ He said that public money is spent instructing counsel to provide an opinion on the law, which everyone is entitled to know.

Crossbench peer Lord Carlile said in The Times that as a matter of law, it is up to the client and there was no contempt of Parliament to refuse to publish privileged legal advice.