Both McCain and Obama use the war to prove their better judgement: Obama likes to point out that in 2003 he, then a state senator, voted to oppose the war while McCain voted for it.
McCain still stands by that call, even though it's since been shown the decision to go to war was based on flawed intelligence.
But McCain counters that he was the main Senate advocate for the surge, President Bush's 2007 decision to send 20,000 more soldiers and 4,000 more Marines into Iraq, while Obama opposed it.
Commanding General David Petraeus now credits the surge for curbing the violent bloodshed and turning things around for American forces.
But with Americans weary of the conflict, the question now is who has the best exit strategy. McCain says he wants the troops home, hopefully by 2013, but insists he will not commit to a timetable, especially publicly.
Obama, on the other hand, pledges to bring a brigade or two home every month, withdrawing all but a small force from Iraq within 16 months of taking office.