Crocker said that al-Qaida in Iraq could try to fight its way back
The outgoing American ambassador in Iraq, Ryan Crocker, has warned against "a precipitous withdrawal" of US troops from the country.
Mr Crocker, who is retiring after a 30-year diplomatic career, said such a move would be dangerous.
Mr Crocker was speaking to journalists the day after briefing President Barack Obama on the situation in Iraq.
The US and Iraq have already signed a deal under which American combat troops are to leave by the end of 2011.
But during his election campaign Mr Obama said he wanted them out by the middle of 2010.
On Wednesday the new president told US military leaders to draw up plans for what he called a responsible withdrawal, but correspondents say it is not clear whether that would dramatically speed up the intention to leave in 2011.
The US has 140,000 military personnel deployed in Iraq.
"A precipitous withdrawal runs some very severe risks," Mr Crocker said, including a possible revival of al-Qaida in Iraq. He said it might encourage "neighbours with less than benign intentions" to influence events in Iraq.
He said al-Qaida in Iraq had been much weakened.
"But as long as they can cling to some handhold here, they are going to keep trying to literally fight their way back," Mr Crocker said.