Mr Campbell said the prime minister recognised the deep opposition to military action amongst much of the British public but believed there would be a "bigger day of reckoning" to come with Saddam if he was not confronted at the time.
As No 10 director of communications between 1997 and 2003, he played a key role in the drawing-up of the government's September 2002 dossier on Iraq's alleged weapons of mass destruction, containing the controversial claim that they could be deployed within 45 minutes.
"Could things have been done differently, almost certainly," he said of the March 2003 invasion.
"Any decision, you can go back over it, but on the big picture, on the leadership that he [Tony Blair ] showed, on the leadership that the British government showed on this issue, I was privileged to be there and I'm very very proud of the part that I was able to play."
He added: "I think that Britain, far from beating ourselves up about this, should be really proud of the role that we played in changing Iraq from what it was to what it is now becoming."
Mr Campbell said he was "very close" to the prime minister but stressed that Mr Blair fully consulted other key ministers on Iraq policy - including the then Chancellor Gordon Brown.
Mr Campbell, who has given evidence to three previous inquiries on Iraq, said claims that Mr Blair endorsed regime change after a meeting with President Bush at his Crawford ranch in April 2002 were not true.
AT THE INQUIRY
BBC World Affairs correspondent Peter Biles
Officials of the Iraq Inquiry completely under-estimated the length of time needed to question Alastair Campbell.
It had been expected that a three hour morning session would suffice. In the event, the hearing rolled on for another two hours into the afternoon, with Mr Campbell having ample opportunity to defend Tony Blair's premiership and the decision to take Britain to war in Iraq.
At this rate, two days rather than one will be needed when Mr Blair arrives to present his evidence in two or three weeks' time.
The former Downing Street spin-doctor was generally at ease as he faced the Inquiry. Interestingly, the Chairman, Sir John Chilcot, took little part in today's session, and left the questioning to his four colleagues.
For once, there were some quite lively exchanges as the committee sought to square Mr Campbell's version of events with some of the earlier evidence heard.
British policy was still focused on disarming Iraq and getting it to abide by UN resolutions, he argued, as Mr Blair "genuinely believed" Iraq's pursuit of weapons of mass destruction must be dealt with.
Mr Blair was clear that military action should be regarded as a last resort if the diplomatic process failed and still hoped that the issue could be "peacefully resolved" right up to the eve of war.
"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," he said. "It was not like this."
But he revealed that Mr Blair had written to President Bush during 2002 about the disarmament strategy, saying: "If that cannot be done diplomatically and it is to be done militarily, Britain will be there. That would be the tenor of the communication to the president."
The Lib Dems, who opposed the invasion, have called for the letters to be published, saying Mr Campbell's evidence cast further doubt on the legality of the war.
Former Conservative Foreign Secretary Sir Malcolm Rifkind, who opposed the invasion, said the letters would show the extent to which Tony Blair and George Bush were "hand in glove" over the issue and should be available to the public.
Asked about weapons of mass destruction, Mr Campbell said Tony Blair believed Iraq posed a "unique threat" because Saddam Hussein had used them before and there was no means of dialogue with him.
Mr Campbell said he had provided "presentational" support on the key September 2002 dossier but, at no stage, did No 10 try to "beef up or over-ride" the judgements of the intelligence agencies.
Describing it as a "cautious" assessment, he insisted it had not been designed to present the "case for war" but to highlight why Mr Blair was increasingly "concerned" about the threat posed by Iraq.
"I don't believe the dossier in any sense misrepresented the position."
The dossier included a foreword by Mr Blair in which he wrote that he believed the intelligence had established "beyond doubt" that Saddam Hussein had continued to produce chemical and biological weapons.
Sir John Scarlett, chairman of the Joint Intelligence Committee, told the inquiry last month that the foreword was "overtly political" and "quite separate" from the rest of the dossier.
Mr Campbell, who drafted the first version of the foreword - ultimately approved by Mr Blair - said no-one in intelligence challenged this statement which, he added, never suggested Saddam Hussein "was able to do something terrible to the British mainland".
On the 45-minute claim, which was retracted after the war, he said the dossier "obviously" could have been clearer about it referring to battlefield munitions.
But he insisted Mr Blair put forward a balanced argument in the House of Commons on the issue and the 45-minute claim was only given "iconic" status by the press.
January-February: Tony Blair, Jack Straw and other politicians to appear before the panel
March: Inquiry to adjourn ahead of the general election campaign
July-August: Inquiry expected to resume with Gordon Brown and David Miliband among those appearing
Report set to be published in late 2010 or early 2011
Questions about Mr Campbell's role in the dossier were at the centre of a post-war row with the BBC culminating in the death of the government weapons expert Dr David Kelly and the subsequent Hutton inquiry.
Mr Campbell said he was "never in doubt" that Iraq would be found to have weapons of mass destruction and the realisation that they did not was "very difficult".
On the invasion's aftermath, he said it became clear within a week that things were not going well and there was a lack of "grip".
He argued that Secretary of State for International Development Clare Short, who resigned shortly after the invasion in protest about post-war strategy, was "difficult to handle" and suggested there was a fear she might leak things she did not agree with.
Former Defence Secretary Geoff Hoon and former Foreign Secretary Jack Straw will give evidence to the inquiry next week with Mr Blair expected to appear at a later date.
His successor as prime minister, Gordon Brown, will not give evidence until after the general election, expected to take place in May.
The SNP have called for Mr Brown to give evidence before the election as it was he, as chancellor, who "bankrolled" the military campaign.
The Iraq Inquiry's final report is due to be published by early next year.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.