Gordon Brown today expressed his sorrow for the loss of life in the conflict in Iraq while insisting it had been the "right decision" to overthrow Saddam Hussein.
In his long-awaited appearance before the Chilcot Inquiry, the Prime Minister said the Iraqi dictator had to be confronted as a "serial violator" of international law.
While he expressed "regrets" over the failure to plan properly for the aftermath of the invasion, he strongly rejected claims that, as chancellor of the exchequer, he had failed to provide the armed forces with the resources they needed.
"Every request that military commanders made to us for equipment was answered. No request was ever turned down," he said.
But although Mr Brown backed Tony Blair's decision to go to war, he took a noticeably more conciliatory tone than his predecessor who insisted he had no regrets when he appeared before the inquiry in January.
Mr Brown began and ended his four hours of testimony by paying tribute to the 179 British servicemen and women who lost their lives in the conflict, while acknowledging the "huge" death toll among Iraqi civilians.
Although Britain and the United States had acted for the "right reasons" he said, it is important lessons are learned.
"Obviously the loss of life is something that makes us all sad. We have got to recognise that war may be necessary, but it is also tragic in the effect it has on people's lives," he said.
"These were difficult decisions, these were decisions that required judgment, these were decisions that required strong leadership, these were decisions that were debated and divided a lot of opinion in the country.
"I believe they were the right decisions for the right reasons but I also believe it is our duty to learn the lessons from what has happened.
"No one who makes the decisions that cabinets and governments have to make can do so without recognising that lives are affected and sometimes lives are lost as a result of the big decisions and the big challenges we have got to meet."
Mr Brown said he had been kept "fully informed" about developments in the build-up to the invasion in March 2003 but at the same time he made clear that he was not central to the decision-making process.
"In the different committees obviously the prime minister was talking to the foreign secretary (Jack Straw) and the defence secretary (Geoff Hoon) about the options. I was not involved in those discussions but I was aware of what was happening," he said.
Mr Brown said he was not involved in the discussions ahead of Mr Blair meeting George Bush at his ranch in Crawford, Texas, in April 2002 - where Mr Blair made clear Britain would join any military action - and he did not see Mr Blair's private correspondence with the president.
Mr Brown added he only became actively involved in the preparations for war two months later when the Treasury drew up a paper on the costings.
In the course of 2002 and 2003, he had received a total of five briefings from the intelligence agencies which had convinced him that Iraq represented a threat which had to be dealt with.
However he said that he had consistently argued in Cabinet that military action should only be used as last resort once all the diplomatic avenues to find a peaceful resolution had been exhausted.
He admitted that more should have been done to plan for the aftermath of the invasion and he criticised the US "neo-cons" who thought they could simply "conjure up" democracy in Iraq.
"It was one of my regrets that I wasn't able to be more successful in pushing the Americans on this issue - that the planning for reconstruction was essential, just the same as planning for the war," he said.
"I never subscribed to what you might call the neo-conservative proposition that somehow, at the barrel of a gun, overnight liberty or democracy could be conjured up."
But he added: "I cannot take personal responsibility for everything that went wrong."
Mr Brown insisted that throughout he had given the military the resources they needed for the campaign, providing an additional £8 billion since 2002 on top of a rising "core" defence budget.
"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.
"At any point, commanders were able to ask for equipment that they needed and I know of no occasion when they were turned down."
He acknowledged the concerns of the families of soldiers killed travelling in lightly armoured Snatch Land Rovers, but insisted the choice of the equipment used on particular operations was a matter for the military.
When the Ministry of Defence asked for better protected vehicles in 2006, he said he provided £90 million to enable the purchase of 150 Mastiff and Bulldog armoured vehicles.
"That was a decision that military commanders could make only themselves. But once these new vehicles were asked for, they were offered and the money was paid, I think within months," he said.
He also defended the decision to curb defence spending following the invasion in 2003, after the MoD used new Whitehall accounting rules to claim that it had found £1.3 billion in efficiency savings to spend on new equipment.
"If we had had every department doing what the Ministry of Defence was doing, we would have had the extra cost of £12 billion which would be the equivalent of raising income tax by 3p in the pound," he said.
Although security was tight at the Queen Elizabeth II Conference Centre, where the hearing took place, there was little in the way of the protests which marked Mr Blair's appearance and Mr Brown was able to enter and leave by the front entrance.
Susan Smith, whose son Private Phillip Hewett died when his Snatch Land Rover was blown up in July 2005 and who was in the inquiry room for the hearing, said she was unimpressed by what she had heard.
"To be honest, I just get a feeling that some of it is spin. I imagine he's genuinely sorry, but is it for political reasons that he said it?," she said.
Shadow defence secretary Liam Fox said: "Gordon Brown was a member of the inner circle, but true to form he didn't want to take any responsibility for decisions which had negative consequences.
"He admitted that planning for the war was deficient, but with typical weasel words he tried to pin the blame on everyone else, above all the Americans. The Prime Minister put on a typically evasive performance, answering the questions he wanted to hear, rather than the questions which were put to him.
"There are still contradictions between what Gordon Brown said about defence spending, and what Geoff Hoon, Lord Walker, Lord Guthrie and Sir Kevin Tebbit have said. There have been consistent allegations that the 1998 Strategic Defence Review was underfunded, which were not addressed. There have been consistent allegations that, as Chancellor, Gordon Brown was so unsympathetic to the Armed Forces that he denied them what they needed for what the Government asked of them.
"Something does not add up here."
Liberal Democrat leader Nick Clegg said: "This was the day Gordon Brown finally had to come clean and admit that he believes the Iraq war was right.
"We now know we were betrayed by Gordon Brown and we were betrayed by the Labour Party.
"How can we trust a man who still believes that this illegal war and all the horror it has caused was right?
"When the Liberal Democrats were the only party to oppose this immoral invasion we didn't just speak for us, we spoke for the nation."