The Chilcot inquiry into the Iraq war was designed to “avoid blame” and reduce the risk that individuals and the government could face legal proceedings, newly released documents reveal.

The papers show the thinking and advice at “the highest level of government” prior to Gordon Brown’s announcement of an inquiry. They were disclosed under the Freedom of Information Act, after the Cabinet Office lost a two-year battle during which it stated that disclosure threatened to “undermine the inquiry”. They confirm that many officials who took part in the events that the inquiry investigated, including former spy chief Sir John Scarlett, were involved in setting it up.

And they reveal that Sir (now Lord) Gus O’Donnell, cabinet secretary under Brown, went against Whitehall protocol when he appointed a civil servant with significant involvement in Iraq policy during the period covered by the inquiry to the key role of inquiry secretary.

The documents, a series of memos by Whitehall officials, cover a four-week period in May and June 2009. They show the officials favoured from the outset a secret inquiry to be conducted by privy counsellors, based on the Franks inquiry into the Falklands war. In a memo to O’Donnell, Cabinet Office official Ben Lyon advised that the format, scope and membership of the inquiry could be designed to “focus on lessons and avoid blame”. He noted that politicians and campaigners, including Plaid Cymru and the SNP, were seeking other types of inquiry with some advocating “a full public inquiry that would place blame on individuals”.

Chris Lamb, a freedom of information campaigner from Bristol who won an information tribunal ruling in May requiring the Cabinet Office to disclose the papers, told the Observer: “Avoiding blame is civil service code for not holding people accountable.” Despite the inquiry being designed to “avoid blame”, the then foreign secretary, David Miliband, subsequently claimed it could blame “whoever it likes”.

Lyon noted that former foreign secretary Lord Hurd had suggested a parliamentary inquiry. But Lyon warned that would “attract a daily running commentary”, like the 2003 Hutton inquiry into the death of Iraq weapons inspector David Kelly. In a subsequent note to Brown, O’Donnell repeated the “daily commentary” warning and advised against a full public inquiry for other reasons, including cost, that it would “threaten legal liability for individuals” and, ironically, “take a long time”. “The deliberate lack of transparency and attempts to use price to justify further secrecy is deeply concerning,” said Lib Dem leader Tim Farron.

O’Donnell also advised against appointing judges or lawyers who would adopt a “legalistic” focus. He recommended using the inquiry’s terms of reference to prevent it reaching “any conclusion on questions of law or fact, which create circumstances which expose organisations, departments and/or individuals to criminal or civil proceedings or judicial review”. No such instruction to the inquiry was ever made public.

Lamb told the Observer: “This shows the inquiry was hobbled before it even started, with tight restrictions on what it could do that were not fully made public.” In June 2009, Brown announced a secret Privy Council “lessons learned” inquiry, as officials had recommended. However, a public and political backlash forced him to agree to some hearings being held in public.

In another memo to O’Donnell, Lyon advised that the inquiry’s secretariat, though drawn from the civil service “should not have been involved in Iraq policy since 2002”. However, he conceded that appointing staff with “understanding of the nature of the business to be addressed” had advantages. This concession paved the way for appointment of Margaret Aldred, a Whitehall official who had chaired the Iraq senior officials group during the period Chilcot was investigating, as the inquiry’s secretary.

Many others who helped design the inquiry had also been closely involved in the issues it would investigate. They included current cabinet secretary Sir Jeremy Heywood, who was Tony Blair’s parliamentary private secretary until 2003, and Scarlett, former chairman of the joint intelligence committee who had become chief of MI6 in spite of his central role in producing the notorious dossier on Iraq’s non-existent weapons of mass destruction.