Washington (AFP) - The US Army's outgoing chief of staff warned Wednesday that reconciliation between Shiites and Sunnis in Iraq is becoming harder and that partitioning the country "might be the only solution."

General Raymond Odierno, who once served as the top US commander in Iraq and retires Friday after nearly 40 years in uniform, said the US focus for now should be on defeating the Islamic State, the jihadist group that has seized large portions of the country.

But in a valedictory news conference he took a pessimistic view about the underlying conflict between Shiites and Sunnis that brought the two communities to brink of civil war in 2006.

Asked if he saw any possibility of reconciliation between the two, Odierno said "It's becoming more difficult by the day" and pointed to a future in which "Iraq might not look like it did in the past."

Asked about partition, he said: "I think that is for the region and politicians to figure out, diplomats to figure out how to work this, but that is something that could happen.

"It might be the only solution but I'm not ready to say that yet."

In the meantime, he said, "We have to deal with ISIL first and decide what it will look like afterwards." ISIL is an acronym some US officials use in referring to the Islamic State group.

The US military, which withdrew from Iraq in 2011, has resumed training Iraqi forces and select Syrian rebels as part of a renewed effort to contain and eventually roll back IS. US warplanes also are conducting air strikes against IS targets in Iraq and Syria.

Odierno said IS "has been blunted somewhat" by the airstrikes and Kurdish and to a less extent Iraqi forces on the ground.

"I think right now we are kind of at a stalemate and continue to make some progress," he said, adding it was important to continue rebuilding the Iraqi military.

Odierno served as the top US commander in Iraq from 2008 to 2010. He had urged that a residual US force be left in country, but the US and Iraqi governments were unable to reach an agreement that would have allowed them to stay.