Boris Johnson today blasted Rishi Sunak's government for trying to stop the Covid Inquiry getting hold of his unredacted WhatsApp messages.
The former PM said he believed it was right that it should get access to his messages, diaries and notebooks.
The Cabinet Office is bringing a judicial review of inquiry chairwoman Baroness Heather Hallett's order to release the documents, arguing it should not have to hand over material which is "unambiguously irrelevant".
In written arguments put before the court on Mr Johnson's behalf, his lawyers said he has "no objection" to the inquiry having the unredacted material, subject to "appropriate security and confidentiality arrangements" being in place - which he has been assured of by the inquiry.
Mr Johnson, who is an interested party in the case, is asking the court to reject the Government's challenge as he set up the inquiry to put the state's pandemic response "under the microscope".
Lawyers representing the inquiry chairwoman heavily criticised the Cabinet Office, branding the department's argument "at its heart nonsensical".
Sir James Eadie KC, representing the Cabinet Office, said the challenge was "brought with some considerable reluctance", but Lady Hallett's demand was "so broad" it was "bound to catch" a large amount of irrelevant material.
He argued the Covid inquiry did not have the legal power to obtain materials "unconnected to the Government's handling of Covid", including personal, family or medical information that could be found in messages.
But Lord David Pannick KC, representing the former prime minister, said: "Mr Johnson considers that it is appropriate that the chair has all documents that she reasonably considers are potentially relevant to her ongoing investigation."
He said the inquiry "should not be impeded in this process by technical debates as to perceived 'relevance'".
"For the inquiry to carry out its objectives, and for the public to have confidence that it is doing so, it must be for the chair, and not for the Cabinet Office, to decide what material is potentially relevant," he added.
Lord Pannick went on: "In establishing the inquiry, Mr Johnson said in terms he wanted the state's action to be placed 'under the microscope' and that the inquiry must be 'free to scrutinise every document'.
"That is what the public expects and that is what should be done."
The Government took the highly unusual step of launching the challenge earlier in June after Lady Hallet rejected its argument that certain material was not relevant.
The row centres around Mr Johnson's WhatsApp messages, diaries and personal notebooks, which the former prime minister handed over in late May to the Cabinet Office in unredacted form.
Hugo Keith KC, representing the inquiry chairwoman, said the Cabinet Office's argument "is at its heart nonsensical".
He told the court there was a "stark divide" between his arguments and the arguments made on behalf of the department.
"The reality is the inquiry cannot issue any notice confident that every single part of it, every single document or part of a document will turn out to be relevant," he said.
"There simply could not have been a notice sensibly drawn up that could refer to individual messages."
Mr Keith added that the idea that the Cabinet Office could decide which aspects were relevant "would emasculate this and future inquiries".
He told the High Court at the start of his submissions: "The chair, for her part, argues that it is permissible within the bounds of rationality for the (inquiry) to seek material that is, in the opinion of the chair, potentially relevant, whether or not it may turn out to be so after all.
"There is no point of principle underpinning the Cabinet Office's argument."
The hearing, before Lord Justice Dingemans and Mr Justice Garnham, is due to conclude today and the judges are expected to give their ruling at a later date.
* Follow Mirror Politics on Snapchat , Tiktok , Twitter and Facebook .