2007:
"Let me be clear: There is no military solution in Iraq and there never was," said Obama.

"The best way to protect our security and to pressure Iraq's leaders to resolve their civil war is to immediately begin to remove our combat troops. Not in six months or one year - now."
Obama calls for the immediate withdrawal of US combat troops from Iraq

2009:
The Pentagon is prepared to remain in Iraq for as long as a decade despite an agreement between Washington and Baghdad that would bring all American troops home by 2012, according to the US army chief of staff.
US Army prepared to stay in Iraq for a decade