(CNN) -- Although it has been over for nearly a year now, the war in Iraq continued to be a flash point in Monday night's debate between President Barack Obama and his Republican challenger, former Massachusetts Gov. Mitt Romney.
"You say that you're not interested in duplicating what happened in Iraq," said Obama, a Democrat who opposed the U.S.-led invasion in 2003. "But just a few weeks ago, you said you think we should have more troops in Iraq right now. ... You said that we should still have troops in Iraq to this day."
But Romney, who supported the invasion, said Obama wanted to keep U.S. troops there longer -- he just couldn't get the Iraqis to go along.
"There was an effort on the part of the president to have a Status of Forces Agreement, and I concurred in that, and said that we should have some number of troops that stayed on," Romney said.
"You thought it should have been 5,000 troops," he told Obama. "I thought there should have been more troops, but you know what? The answer was we got no troops through whatsoever."
Since the nearly nine-year war remains controversial back home, CNN is taking a closer look at both candidates' claims.
The Status of Forces Agreement signed between the United States and Iraq in 2008 called for U.S. troops to withdraw from Iraqi cities by 2009 and be out of the country entirely by the end of 2011.
Obama opposed the 2003 invasion of Iraq while still a state legislator in Illinois and ran for president on a platform of ending that war. But with the 2011 deadline nearing, his administration -- which took office after the agreement was signed -- tried to make arrangements with Iraq to keep between 3,000 and 5,000 Americans in the country to help train Iraqi security forces.
"If they want the benefits of what we can provide, if they want the assistance, if they want the training, if they want the operational skills that we can provide, then I think they have to understand that they've got to give us some protections in that process," Defense Secretary Leon Panetta said in October 2011.
Those talks failed when the Iraqis refused to grant legal immunity for U.S. troops, and the last U.S. convoy left Iraq in December 2011. Obama touted that as a promise kept, saying Americans would be leaving "with their heads held high."
The president also has touted that as a promise kept during his re-election campaign. But Romney has consistently criticized the Obama administration for its failure to reach a deal with the Iraqi government on keeping those troops there.
In December 2011, with the final pullout looming, Romney told Fox News Sunday that the Obama administration was ending the American presence "in a precipitous way, and we should have left 10,000, 20,000, 30,000 personnel there to help transition to the Iraqis' own military capabilities."
Two weeks before Monday night's debate, in a speech at the Virginia Military Institute, Romney said the "costly gains" made in Iraq were slipping away.
"And yet, America's ability to influence events for the better in Iraq has been undermined by the abrupt withdrawal of our entire troop presence," he said. "The president tried -- and failed -- to secure a responsible and gradual drawdown that would have better secured our gains."
Each man's attacks are rooted in fact. The Obama administration did attempt, unsuccessfully, to extend the presence of a scaled-back U.S. training mission in Iraq, while Romney has said Washington should have kept a considerably larger force in Baghdad.
CNN's Mike Mount, Jamie Crawford and Matt Smith contributed to this report.