The man at the heart of Downing Street in the run-up to the Iraq invasion disclosed on Tuesday that Tony Blair assured America back in 2002 that he would support any military attack on Iraq if diplomatic efforts to “disarm” Saddam Hussein failed.

Alistair Campbell, who was Mr. Blair’s communications chief and privy to his private correspondence, told the Iraq inquiry — now in its fifth week — that in “exchanges” with the then U.S. President, George W. Bush, his boss “shared” the American assessment about the need to remove Saddam militarily if he did not disarm.

“Yes, that was the tenor,” he said when asked if he was aware that Mr. Blair wrote to Mr. Bush in 2002 committing British support to any invasion.

His remarks confirmed that behind-the-scenes Mr. Blair and Mr. Bush had agreed on a military solution even as in public they were claiming that no decision had been taken.

In comments that would embarrass Prime Minister Gordon Brown, who has sought to distance himself from the Iraq controversy, Mr. Campbell said that Mr. Brown — then the Chancellor of the Exchequer — was closely involved with the decisions leading to the invasion.

The five-member inquiry, chaired by Sir John Chilcot, a retired senior civil servant, is looking into Britain’s role in the Iraq invasion and the “lessons” to be learned from that military adventure.

Mr. Campbell, who was accused of “sexing up” the controversial dossier about Iraq’s supposed weapons of mass destruction to justify the invasion, often seemed to lose temper under close examination.

Asked whether he would have done “anything” for his boss, he retorted: “Well if he’d asked me to jump off a building, I wouldn’t.”

In reply to another question, he said: “You seem to be wanting me to say that Tony Blair signed up to saying, regardless of the facts and WMD, we are going to get rid of this guy… It was not like this.”

For most part during the day-long tense hearing, Mr. Campbell lived up to his combative reputation, angrily dismissing any criticism. He defended the claim made in the dossier that a WMD-loaded Iraq was capable of hitting Britain within 45 minutes, even though the claim was later withdrawn.

“I will defend the integrity of the dossier to my last day,” he declared and accused the media of “rewriting” history.

Mr. Campbell also rubbished the then British Ambassador to Washington, Sir Christopher Meyer’s testimony that Mr. Blair appeared to have made up his mind about a regime change in Iraq after a private meeting with Mr. Bush at his Crawford ranch in early 2002. It was a “wrong portrayal” of the meeting he said.

Mr. Blair is expected to testify next month.