WASHINGTON (CNN) -- Republican presidential front-runner Sen. John McCain on Thursday defended his statement that U.S. troops could spend "maybe 100" years in Iraq -- saying he was referring to a military presence similar to what the nation already has in places like Japan, Germany and South Korea.

Sen. John McCain defends his stance on troops in Iraq Thursday on CNN's "Larry King Live."

This week, Democratic presidential candidates Sen. Hillary Clinton and Sen. Barack Obama both took McCain to task for the comments, saying that if he's elected he would continue what they call President Bush's failed policies in Iraq.

"It's not a matter of how long we're in Iraq, it's if we succeed or not," McCain said to CNN's Larry King.

"And both Sen. Obama and Clinton want to set a date for withdrawal -- that means chaos, that means genocide, that means undoing all the success we've achieved and al Qaeda tells the world they defeated the United States of America.

"I won't let that happen."

Last month, at a town hall meeting in New Hampshire, a crowd member asked McCain about a Bush statement that troops could stay in Iraq for 50 years.

"Maybe 100," McCain replied. "As long as Americans are not being injured or harmed or wounded or killed, it's fine with me and I hope it would be fine with you if we maintain a presence in a very volatile part of the world where al Qaeda is training, recruiting, equipping and motivating people every single day."

The remaining Democratic contenders for the White House seized on the statement. Watch McCain talk about Mitt Romney's endorsement and his critics on the right »

"He said recently he could see having troops in Iraq for 100 years," Clinton said at an Arlington, Virginia, rally last week in a line she's repeated on the campaign trail. "Well, I want them home within 60 days of my becoming president of the United States."

Obama took a similar tack.

"Sen. McCain said the other day that we might be mired for 100 years in Iraq -- which is reason enough not to give him four years in the White House," Obama has said on several occasions.

McCain told King he thinks opponents are taking the quote out of context. He said any long-term troop presence in Iraq would depend on agreement from the Iraqi government.

"If they don't want to and we don't feel a need to do so, obviously, the whole thing is keyed to Americans being able to withdraw and come home with honor, not in defeat," he said.

McCain was endorsed Thursday by former Massachusetts Gov. Mitt Romney, once considered his fiercest rival for the GOP nomination.

Former Arkansas Gov. Mike Huckabee remains in the race, although McCain has an overwhelming advantage in the number of delegates earned for this year's Republican convention. E-mail to a friend

All About Iraq • John McCain • Mitt Romney