McCain had fiercely rejected any suggestion of a timetable for withdrawing US troops from Iraq, as proposed by the Democratic Party, but this week gave for the first time a date for when he would like most troops home -- 2013.
"By January 2013, America has welcomed home most of the servicemen and women who have sacrificed terribly so that America might be secure in her freedom," the Arizona senator said Thursday in a crystal ball speech in Columbus, Ohio.
"The Iraq war has been won. Iraq is a functioning democracy, although still suffering from the lingering effects of decades of tyranny and centuries of sectarian tension."
His remarks appeared aimed at Democratic and independent voters ahead of November's presidential election, in an attempt to mitigate the fall-out from being the only candidate in favor of continuing a highly unpopular war.
McCain has been under constant fire from Democrats for suggesting US soldiers might stay in Iraq for "100 years," in the same way they remained in South Korea following the end of the Korean War. Shifting positions on Iraq are not confined to the Republican camp, however.
Obama, who is leading the race against Hillary Clinton for the Democratic presidential nomination, has recently taken a more cautious approach to his pledge to pull out of Iraq within 16 months of taking office in January 2009.
Amid warnings of the risks of leaving too early, the Illinois senator -- a strong opponent of the war -- said that he reserves the right to change this policy depending on the situation on the ground.
"I will always listen to our commanders on the ground with respect to tactics ... we are going to proceed deliberately, in an orderly fashion, out of Iraq," Obama said in a debate mid-April with Clinton.
"If they come to me and want to adjust tactics, then I will certainly take their recommendations into consideration. But ultimately, the buck stops with me as the commander in chief."
Samantha Power, a former Obama advisor, caused a stir in an interview with the BBC in March in which she appeared to suggest the White House hopeful might water down his withdrawal plans.
"He will of course, not rely on some plan that hes crafted as a presidential candidate or a US senator," she said. "You can't make a commitment ... in March of 2008, about what circumstances are going to be like in January 2009."
Both Republicans and Democrats deny their positions are moving closer.
"There is no similarity," said Steve Schmidt, an advisor to McCain. Another aide, Mark Salter, insisted the 2013 date was not set in stone: "Hes not saying win or lose, they come home in four years."2
Obama himself drew a clear line between his policy and that of his Republican rival on Friday, saying McCain "didn't explain" how he was going to achieve the pull-out within five years.
"That's why there will be a clear choice in November -- fighting a war without end or ending this war and bringing our troops home. Because we dont need John McCains predictions about when the war will end. We need to plan to end it," he said.
Michael OHanlon, a defense expert at Brookings Institution, also rejected the notion that the two parties were converging on Iraq policy.
McCains decision to give a timeframe on a pull-out was a "major development," he said, conceding it "might partially respond to some of the same public sentiment that Americans just dont want to be in Iraq forever."
But he said: "Being down to 50,000, 60,000 troops after four more years is much different than being down to lets say 20,000 troops after 16 months."