US President Barack Obama speaks during a dinner honouring members of the Armed Forces who served in Operation Iraqi Freedom and Operation New Dawn and their families at the White House.

US President Barack Obama honoured Iraq war veterans at a special White House dinner, hailing their service throughout the nearly nine-year conflict as a model for the country.

“On behalf of over 300 million Americans, we want to express those simple words that we can never say enough, and that's 'thank you,'“ Obama said at the dinner late Wednesday.

Nearly 80 service members and their guests were invited to the soiree aimed at closing a controversial chapter of US history, with every branch of the uniformed armed services represented, according to the Pentagon.

Those invited represented every US state and territory, officials said.

US troops completed their withdrawal from Iraq late last year, ending a war that began in 2003 with the swift ouster of Saddam Hussein but unleashed a fierce insurgency and ignited years of brutal sectarian fighting.

“In one of the nation's longest wars, you wrote one of the most extraordinary chapters in American military history,” Obama said.

“Now the Iraqi people have a chance to forge their own destiny and everyone of you who served there can take pride in knowing that you gave the Iraqis that opportunity, that you succeeded in your mission,” he said.

“I couldn't be more grateful for your example of the kind of country we can be, of what we can achieve when we stick together.”

Secretary of Defense Leon Panetta, Chairman of the Joint Chiefs of Staff General Martin Dempsey and the chiefs of the five uniformed services - army, navy, air force, marines and coast guard - as well as the National Guard and Reserve, also attended the dinner.

CIA Director David Petraeus, widely credited with turning around the US war effort in 2007, when the now-retired general presided over the so-called troop surge and a dramatic drop in violence, did not attend the dinner.

A CIA spokesperson did not provide a reason for his absence, but said Petraeus “deeply values the contributions of Americans to the crisis in Iraq and honours those contributions from his new post at the CIA”.

Obama, an opponent of the controversial invasion that overthrew Saddam, removed the last US troops at the end of last year, after Iraq disagreed with plans to keep a residual force. - AFP