Gordon Brown today defended the invasion of Iraq but said he regretted that he had not been able to persuade the US to take postwar planning "seriously enough" to ensure a "just peace".
The prime minister revealed his frustration with US politicians in the build-up to the war when he told the Chilcot inquiry about his involvement in planning, discussions and decision-making while serving as chancellor.
In the first hour of his evidence, Brown said the US-led invasion had been the "right decision made for the right reasons".
Saddam Hussein was a "serial violator" of UN resolutions and a clear message had to be sent to "rogue states" that international law could not be flouted, he added.
He told the inquiry he had not been kept in the dark by the then prime minister, Tony Blair, in the run-up to the invasion, and said he had been convinced by a series of intelligence briefings that Iraq was a threat that "had to be dealt with".
Responding to comments by former cabinet colleagues to earlier sessions of the inquiry, he also maintained he had imposed "no barrier" on funding the military and had tried to place a sharper emphasis on postwar reconstruction.
Brown acknowledged that there were "important lessons" to be learned from the way Iraq had descended into chaos following the invasion.
He said he had prepared a paper on the issue as early as September 2002, and had held a number of discussions on how international institutions could be brought in to aid reconstruction.
The prime minister – who had originally been scheduled to give evidence to the inquiry after the general election – told the panel: "I was determined – and I may say its one of my regrets I wasn't able to push the Americans further on this issue – that the planning for reconstruction was essential just at the same time as the planning for war if the diplomatic avenue failed.
"We were working on reconstruction and what might be done with what I called earlier the search for a just peace ... we were looking at that early on."
Brown added that he had offered to present a paper as part of cabinet discussions on the matter in March.
"We were determined to understand how we could get the international institutions involved in reconstruction," he told the panel.
"We didn't see how it was possible for Britain and America ... without the International Monetary Fund, the World Bank and the UN in the end being involved with reconstruction, to get finance to the order of £45bn of reconstruction.
"So we were focused on this issue of reconstruction and, as I say, I wish it had been possible to follow that through much more quickly in the aftermath of the first few days of the battle."
Earlier in the inquiry, the former secretary of state for international development Clare Short told the panel Brown had said Britain should play an "exemplary role" in reconstruction, but that funding had not been forthcoming.
When she asked the Treasury, she was told "there is no money", she said.
Asked about claims that the department for international aid and development had not got the funds it needed on time, Brown said the department had been told to use an £80m contingency first.
The Treasury the provided an extra £120m and also gave the Foreign Office an extra £20m, he said.
Brown told the inquiry he had made it clear "at every point" that the Treasury would support whatever military option it was decided was best.
The PM has been accused of "guillotining" the military budget during his time as chancellor, forcing helicopter and warship projects to be axed.
The inquiry has already heard from defence chiefs and ministers who complained that the Treasury imposed swingeing cuts after the invasion in March 2003.
General Lord Walker of Aldringham, the former head of the armed forces, revealed that Britain's top military chiefs had threatened to resign in protest.
Brown said it was not his job as chancellor to interfere with the chosen military options for the invasion.
He said that, in mid-2002, he had told Blair money would be no object if Britain launched military action against Saddam, and was involved in discussions with the then defence secretary, Geoff Hoon, about a possible conflict from June 2002.
"I said immediately to the prime minister that the military options that were under discussion, there should be no sense that there was a financial restraint that prevented us doing what was best for the military," he said.
"I told him that I would not – and this was right at the beginning – I would not try to rule out any military option on the grounds of cost. Quite the opposite."
He told the inquiry there had not been a limit on the amount available for urgent operational requirements (UOR) – specific requests for money from the MoD for military operations.
"I know of no case where an UOR was turned down at any time ... I said to my officials all UORs must be met," he said.
Brown told the inquiry that £500m had initially been set aside for UORs, but around £2bn of the £8bn total was spent in Iraq. This was money in addition to the MoD budget, he added.
The PM paid tribute to the military personnel who had lost their lives in the conflict, but backed the decision to go to war, saying terrorists and "rogue states" were the "two risks to the post-cold war world" and had to be tackled.
But he said the "more basic question" for him was that Iraq was in breach of UN resolutions and claimed that both he and Blair had focused efforts on finding a diplomatic solution.
"Right up to the last minute, right up to the last weekend, I think many of us were hopeful that the diplomatic route would succeed," he said.
"Nobody wants to go to war, nobody wants to see innocent people die, nobody wants to see their forces put at risk of their lives.
"Nobody would want to make this decision, except in the gravest of circumstances where we were sure that we were doing the right thing.
"I think it was the right decision and made for the right reasons."