Leaked Whitehall documents present an extraordinarily revealing picture of how Tony Blair's closest advisers and his foreign secretary, Jack Straw, warned him of the pitfalls of following the Bush administration's march to war against Iraq.

For Blair, it was inconceivable that the US would invade without Britain. He was desperate to get UN approval to satisfy parliamentary and public opinion. We know that Lord Goldsmith, the attorney general, changed his advice to suit his client's wishes.

The secret papers, leaked to the Daily Telegraph, disclose the extent of concerns in Whitehall about Washington's openly stated objective - namely, regime change, considered illegal by British government lawyers - and the lengths to which senior British officials connived to manipulate opinion.

The documents provide an exceptional insight into the mindset of Blair's entourage during a bout of high-level contacts across the Atlantic in the spring of 2002, a year before the war.

They have added significance in the light of comments last week by Kofi Annan, who said the invasion was "illegal", and of the draft final report by the Iraq Survey Group, which found no sign of WMD (the British justification for war) and no evidence that Saddam Hussein was trying to resume his nuclear arms programme.

The documents show that early in March 2002, ministers were warned by Cabinet Office officials that the Bush administration was pushing hard for an invasion to topple Saddam even though there was no evidence he posed more of a threat than previously, or supported international terrorism.

"This makes moving quickly to invade legally very difficult," warned officials. They advised a long game or, as they put it, "a staged approach, establishing international support, building up pressure on Saddam and developing military plans".

A few days later, Sir David Manning, Blair's chief foreign policy adviser (and now our ambassador in Washington), described in a memo to the prime minister a dinner with Condoleezza Rice, Bush's national security adviser. "We spent a long time at dinner on Iraq. It is clear that Bush is grateful for your support and has registered that you are getting flak. I said that you would not budge in your support for regime change but you had to manage a press, a parliament, and a public opinion that was very different than anything in the States. And you would not budge on your insistence that, if we pursued regime change, it must be very carefully done and produce the right result. Failure was not an option."

Manning added: "I told Condi that we realised that the [Bush] administration could go it alone ... But if it wanted company, it would have to take account of its potential coalition partners." This was a reference to the UN route. However, "renewed refusal by Saddam to accept unfettered [weapons] inspections would be a powerful argument".

Three days later, on March 17, Paul Wolfowitz, the US deputy defence secretary, was the guest at a lunch with the British ambassador, Sir Christopher Meyer. After the lunch, Meyer composed a private letter to Manning. "I ... went through the need to wrongfoot Saddam on the inspectors and the UN security council resolutions and the critical importance of the Middle East peace plan. If all this could be accomplished skilfully, we were fairly confident that a number of countries could come on board."

According to the documents, Peter Ricketts, political director at the Foreign Office, described the US as "scrambling to establish a link between Iraq and al-Qaida", a link that was "so far frankly unconvincing". He told Jack Straw: "We have to be convincing that the threat is so serious/imminent that it is worth sending our troops to die for. Regime change does not stack up. It sounds like a grudge match between Bush and Saddam."

Soon after, Straw warned Blair about his meeting at Bush's Texas ranch in early April 2002: "The rewards ... will be few. The risks are high, both for you and the government."

The documents address the key problems overcome, one way or another, by the government before the invasion: the nature of the threat Saddam posed and the reasons for going to war. The frantic transatlantic discussions were dictated by the imperative of making the war appear legal.

Regime change on its own was illegal, and there was no justification in terms of "self-defence against an imminent threat". In the end, the attorney general argued that a war would be legal on an interpretation of UN security council resolutions.

But in a key passage in his report, Lord Butler stressed that even this did "require the prime minister ... to be satisfied that there were strong factual grounds for concluding that Iraq had failed to take the final opportunity to comply with its disarmament obligations". This, Butler suggests, Blair singularly failed to do.

Shortly before the war, the attorney general's office wrote to Blair's making sure it was "unequivocally" the prime minister's view that Iraq had committed new breaches of the latest UN resolution, 1441. Blair's private secretary replied that it was.

That was the wrong question, the Liberal Democrat peer, Lord Goodhart, told peers recently. The right question was: "Did that hard evidence exist?" If Downing Street had looked for it, the attorney general "would, in all probability, not have been able to advise that the invasion of Iraq was legal, and we would not have gone to war", said Goodhart. But the leaked documents make clear that evidence, facts - indeed, the truth - was not Downing Street's main concern.