Sir David was Mr Blair's top foreign policy adviser
Tony Blair signalled that he would be willing to back "regime change" in Iraq when he met George Bush in Texas in 2002, the Iraq inquiry has been told.
But his ex-adviser Sir David Manning said he stressed the UK could only back action against Iraq if the issue went to the United Nations first.
Mr Blair asked for UK military options two months later, Sir David said.
In Texas Mr Bush told him there was "no war plan" for Iraq but a small cell had been set up to consider "options".
Last week the former UK ambassador to the US, Sir Christopher Meyer, told the inquiry he felt Mr Blair's views on regime change had "tightened" after the private meeting in April 2002 at Mr Bush's ranch in Crawford, Texas.
He said as no advisers were present for much of the meeting he could not be "entirely clear what degree of convergence was, if you like, signed in blood".
On Monday, Sir David - who was Mr Blair's top foreign policy adviser from 2001 to 2003 - said the then prime minister had continued to press President Bush to go through the UN route to deal with Saddam Hussein throughout 2002 - including meetings at the Crawford ranch and at Camp David.
AT THE INQUIRY
BBC World Affairs correspondent Peter Biles
This was a strong defence of Tony Blair's policy on Iraq. Sir David Manning repeatedly emphasised that Mr Blair had been determined to go down the UN route by building international consensus.
Sir David gave an impression of the British prime minister trying to put a brake on the more extreme voices in the Bush administration, the neo-conservatives and others, whom he labelled "the regime changers".
But as we now know, Tony Blair began talking about the possible need for regime change immediately after his visit to George W Bush's ranch in Crawford, Texas in April 2002, nearly a year before the war.
For the first time, there has been detailed evidence about the period after the invasion of Iraq. Sir David's assessment of the chaotic post-war reconstruction was a damning indictment of Paul Bremmer, the American who led the Coalition Provisional Authority.
He told the inquiry that at the Crawford meeting, Mr Blair was told by the president that at that stage there was "no war plan" for Iraq but that a "small cell" had been set up in US Central Command in Florida to come up with options for removing Saddam Hussein.
Sir David told the inquiry: "On the one hand the prime minister was very clearly urging the president to go back or adopt the UN route and coalition strategy but was absolutely prepared to say that at the same time he was willing to contemplate regime change if this didn't work.
"I look back at Crawford as the moment that he was saying, yes, there is a route through this that is an international, peaceful one and it is through the UN, but if it doesn't work, we will be willing to undertake regime change."
By June 2002 Mr Blair had asked for some options for UK military involvement, because they were aware US Central Command had started planning, Sir David said.
The next month the defence secretary's office outlined three possibilities. The first was an "in place support package" - using British military assets in the region such as planes in the no-fly zone and bases like Diego Garcia.
The second option was "the enhanced support package" - similar but with "additional maritime assets and aircraft" and possibly some special forces involvement, which would take two months to assemble.
A bigger third option "the discreet UK package" would have offered land forces at about the level of 20,000 troops - which would have meant at least six months' preparation, Sir David said.
Mr Blair had said he did not want to take any decisions at that stage and Sir David said: "I think he didn't want to give any signal that he was keen to think about a military alternative as opposed to going back to the UN route."
That same month, Sir David met the president at the Oval Office where "repeated that it was impossible for the UK to take part in any action against Iraq unless it was through the UN."
Mr Blair will give evidence early in the new year
But in September Mr Blair was asked if Britain wanted to send a team to a planning conference in Florida and what would the British be willing to offer.
Sir David said: "At this stage, the prime minister said he was willing, on an entirely contingent basis, for the military to suggest that we would be willing to offer 'package two' .. but that it had to be absolutely clear that no political decisions had been made in Britain about this.
"Clearly during October there was further discussion between the prime minister and the defence secretary about this and I think as time passed there was an acceptance that if it came to military action that we probably would be willing to move to package three."
On Sunday Mr Blair denied reports his top legal adviser Lord Goldsmith was "gagged" after expressing doubts about the Iraq invasion's legality in a letter which had been submitted to the inquiry.
The Mail on Sunday accused Mr Blair of deliberately keeping him out of cabinet meetings and of bullying the attorney general - who had threatened to resign - into backing down.
Asked if that was an accurate picture, Mr Blair told CNN: "No, it's not".
But he added: "But I think the best thing with this inquiry is actually to let us all give our evidence to the inquiry."