Gates said he favours avoiding the military option against Iran, "given the destabilising policies of the regime and the risks inherent in a future Iranian nuclear threat, either directly or through proliferation".

'Dire consequences'

Gates said if the war in Iraq is "not finished on favourable terms", the consequences could be dire.

Your Views

After five years, was the Iraq war worth it?

Send us  your views

"It is a hard sell to say we must sustain the fight in Iraq right now," he said, "and continue to absorb the high financial and human costs of this struggle, in order to avoid an even uglier fight or even greater danger to our country in the future."

Gates said that US assistance to Afghan fighters in their eventual ousting of Russian troops in the 1980s, was an event that has similarities to the conflict in Iraq.

He said that a similar approach in Iraq, where the US military attempts to defeat Sunni and Shia fighters with the help of government-backed forces, could yield similar results.

The long war

Gates painted a gloomy picture with regard to what he sees as a "long war" ...  likely to be many years of persistent, engaged combat all around the world in differing degrees of size and intensity".

But he said the US military is not organised or equipped for the kind of wars it is currently engaged in today.

"The current campaign has gone on longer, and has been more difficult, than anyone expected or prepared for at the start," Gates said.

"And so we have had to scramble to position ourselves for success over the long haul, which I believe we are doing."

Gates called a reduction of US forces in Iraq "inevitable", with the debate mainly over timing.

But he said that "there are no exit strategies".