"We rejected the audacity of hopelessness, and we were right," McCain said, a play on the title of Obama's book "The Audacity of Hope."
McCain laid out a near-apocalyptic chain of events he said could have resulted had Obama managed to stop the troop buildup ordered by President Bush: U.S. forces retreating under fire, the Iraqi army collapsing, civilian casualties increasing dramatically, al-Qaida killing cooperative Sunni sheiks and finding safe havens to train fighters and launch attacks on Americans, and civil war, genocide and a wider conflict.
"Above all, America would have been humiliated and weakened," he said. "Terrorists would have seen our defeat as evidence America lacked the resolve to defeat them. As Iraq descended into chaos, other countries in the Middle East would have come to the aid of their favored factions, and the entire region might have erupted in war."
Noting that the buildup was unpopular with most Americans, McCain said: "Sen. Obama told the American people what he thought you wanted to hear. I told you the truth."
Obama has called for a withdrawal over 16 months. McCain again criticized him for advocating "a politically expedient timetable" and for voting against funding for troops. McCain had raised eyebrows earlier this week by charging that Obama "would rather lose a war in order to win a political campaign."
However, on CNN on Friday, McCain said that 16 months is "a pretty good timetable." "He said it's a pretty good timetable based on conditions on the ground," McCain said of Iraqi Prime Minister Nouri al-Maliki.
"I think it's a pretty good timetable, as we should - or horizons for withdrawal," he added, echoing a phrase President Bush used in recent days. "But they have to be based on conditions on the ground."
McCain has long maintained that conditions on the ground are a key consideration in any withdrawal of American troops. And he has argued that Obama would withdraw troops based on his timetable without regard to conditions in Iraq, although Obama says he would listen to U.S. military commanders about those conditions.
With one exception, Obama has voted for every spending bill for troops at war. In 2007, Bush vetoed a bill that provided funding on condition of troop withdrawals, and Obama joined 13 other senators who opposed the measure that took its place.
McCain's speech in Denver came at the conclusion of a week in which he struggled against Obama's overseas tour de force. Yet amid the awkward moments, McCain managed to campaign busily in key battleground states and to raise millions of dollars at fundraisers.
Polls in many swing states are close, and some are tightening. The Arizona Republican sought to turn this to his advantage in what was clearly a difficult week to be a stay-at-home candidate.
McCain repeatedly emphasized his long military and congressional background, scolded Obama from afar on foreign policy, and kept playfully fueling speculation that he was close to picking a running mate. His address to the group of Hispanic veterans also gave him a chance to court the valued Hispanic vote.