LOS ANGELES, California (CNN) -- Sen. John McCain could support a 16-month timetable for withdrawing U.S. troops from Iraq, he told CNN's Larry King Monday night.

Sen. John McCain appears Monday in Bakersfield, California, before talking to Larry King.

But the presumptive Republican presidential nominee said he would only do that if military chiefs deemed the "conditions on the ground" safe enough.

Speaking from Bakersfield, California, the Arizona senator said he would not stick to a "hard and firm date" suggested by Sen. Barack Obama, the presumptive Democratic presidential nominee.

"Now whether that fits into 16 months or not, or one month, or whatever, the point is it's got to be conditions-based," he added, saying that's the point Gen. David Petraeus, the U.S. commander in Iraq, "is trying to get over as we go into this political season."

Asked whether he would support an invasion of Iraq again, McCain responded: "The fact that Saddam Hussein was bent on acquiring weapons of mass destruction. ... I think we did the right thing."

"I think that it was a colossal intelligence failure on the part of the United States and every other county as to whether he had them or not," he said.

McCain acknowledged that he initially predicted an "easy victory."

"And then we employed the wrong strategy, which doomed us to failure and we were losing this war when I said we had to have this new strategy all along and stood up for it when most political pundits said that my career was finished."

McCain vowed that if elected president, he would apprehend al-Qaeda leader Osama bin Laden and "bring him to justice no matter what it takes."

Obama made a similar promise on King's show earlier this month, when he said he would pursue bin Laden into Pakistan if adequate intelligence suggested the terrorist leader was there.

McCain, however, would not elaborate on the subject of Pakistan.

"I'm not going to go there ... because Pakistan is a sovereign nation. I think the Pakistanis would want bin Laden out of their hair and out of their country, and it's causing great difficulties in Pakistan itself."

Obama has said that if he's elected president in November, he will ask advice from military commanders on the Iraq war and the fighting in Afghanistan. "But ultimately, the buck stops with me," he told King.

Obama has said the United States should focus on Afghanistan while conducting a gradual troop withdrawal from Iraq by 2010.

"What Sen. Obama doesn't understand is that they are all connected," McCain said Monday of the wars in Iraq and Afghanistan. "If we had lost the war in Iraq, we would have had much greater problems in Afghanistan. Watch McCain share his thoughts on Iraq »

"And also, the strategy that he said wouldn't work in Iraq is the same strategy we have to employ in Afghanistan. It's not just to increase the number of troops; it's secure and hold; it's a government that functions more effectively; it's taking on the narco-traffickers; it's the issue of Pakistan, which is of course the border area -- it's uncontrolled. So it's got to be an overall strategy.

"And Sen. Obama does not understand that, just like he didn't understand the situation in Iraq."

Speaking on domestic issues, McCain said despite his earlier position against off-shore drilling, he now supports the action as a way to offset soaring gas prices.

He also said that unlike President Bush, he wouldn't attend the opening ceremonies at the Olympic Games in Beijing: "I don't think I would, particularly in light of the Tibetan situation. I want good relations with China. I recognize China is an emerging superpower.

"But frankly, I don't question the president's decision and it's a decision only a president can take."

A number of world leaders, including German Chancellor Angela Merkel, Polish Prime Minister Donald Tusk and British Prime Minister Gordon Brown, have said they will not attend the opening ceremonies in Beijing.

McCain also addressed questions about his health that have emerged because of a mole-like growth he had removed Monday from near his temple. McCain has previously suffered from melanoma.

Campaign officials have said the senator's doctor didn't think the growth was anything serious, and that it was removed as a precautionary measure and will be tested.

McCain visited his doctor for a three month check-up.

McCain told King on Monday night that the mole was a byproduct of too much sun exposure over the years.

"As you know, my dad was in the Navy, and we lived in places where I was at the beach a lot and ... I'm paying the price for that," he said. "Melanoma is something if you look at it, and you be careful, it's fine."

CNN political producer Tasha Diakides contributed to this report.

All About U.S. Presidential Election • Iraq War • China