NEW YORK (CNN) -- John McCain has learned his lesson: Don't ever cancel on David Letterman.
Appearing on CBS' "Late Show with David Letterman" Thursday, the Republican presidential candidate apologized for skipping out on a scheduled visit in September that Letterman later made the subject of an ongoing joke.
"I screwed up," McCain told Letterman more than once in the interview that aired Thursday night.
McCain's appearance on the show comes three weeks after he raised the ire of the generally mild-mannered host by canceling at the last minute, citing his decision to suspend his presidential campaign because of the financial crisis.
"This doesn't smell right," Letterman said. "This is not the way a tested hero behaves. Somebody's putting something in his Metamucil."
Letterman also didn't appear to buy the Arizona senator's explanation for the cancellation. At the time, he showed the audience a live feed of McCain preparing for an interview with CBS anchor Katie Couric. After praising McCain's record as a prisoner of war in Vietnam, he said, "This is not the John McCain I know, by God."
Letterman has repeatedly harped on McCain for the missed appearance, noting the Arizona senator's poll numbers appeared to begin to slide right after he skipped out on the show.
"Look at all the conversation I gave you. Including having Mr. Olbermann on," McCain told Letterman Thursday night, referencing the MSNBC liberal talk show host who filled in for him that night.
However, Thursday's interview was not all fun and games, as Letterman pressed McCain on Republican VP Sarah Palin's preparedness to lead the country through "the next 9/11 attack.."
"Absolutely," she is, McCain said. "She has inspired Americans. That's the thing we need."
McCain said her experience as a mayor, governor and PTA member have prepared her to be president.
"In all due respect, one of the people I admired most was an obscure governor of a southern state called Arkansas and he turned out to be a fairly successful president," McCain said. "I mean, Ronald Reagan was a cowboy, no experience in international affairs. So, look, I think she has shown leadership."
When Letterman asked McCain about Palin's charge that Barack Obama "palled around with terrorists," the senator said "he did."
McCain said that while Obama might have been just a child when William Ayers founded the Weathermen, a Vietnam War era group blamed for several domestic bombings. Ayers recently said he regretted not doing more attacks.
"Mr. Ayers, on 2001, September 11, 2001 said, 'I wish I had bombed more,'" said McCain.
McCain's reference was to a New York Times story published on September 11, 2001, when Ayers wrote "I don't regret setting bombs ... I feel we didn't do enough."
Later, after the issue was raised in an April primary debate by Sen. Hillary Clinton, Ayers posted his 2001 reply to the Times story on his blog, saying, "I said I had a thousand regrets, but no regrets for opposing the war with every ounce of my strength."