FRESNO, California (CNN) -- An adviser to Sen. John McCain apologized Monday for saying a terrorist attack on the United States would be "a big advantage" for the Republican presidential candidate.
McCain said he "strenuously" disagreed with the remark.
Charlie Black, a senior adviser to McCain, said he "deeply regrets" his comments to Fortune magazine.
"They were inappropriate," Black told reporters at a fund-raising event in California. "I recognize that John McCain has devoted his entire life to protecting his country."
And McCain distanced himself from the comments, saying he "cannot imagine" why Black would make them.
"It's not true," McCain said. "I've worked tirelessly since 9/11 to prevent another attack on the United States of America. My record is very clear."
McCain cited his work on the Senate Armed Services Committee and his role in creating the 9/11 Commission in describing his efforts to stop terrorist attacks on American soil.
"If he said that, and I do not know the context, I strenuously disagree," McCain said.
Sen. Barack Obama's campaign called Black's remarks an example of "cynical and divisive" politics.
"Barack Obama welcomes a debate about terrorism with John McCain, who has fully supported the Bush policies that have taken our eye off of al Qaeda, failed to bring Osama bin Laden to justice and made us less safe," said Obama campaign spokesman Bill Burton.
"The fact that John McCain's top adviser says that a terrorist attack on American soil would be a 'big advantage' for their political campaign is a complete disgrace, and is exactly the kind of politics that needs to change," he added.
In a Fortune interview, posted on the magazine's Web site Monday, Black said the Arizona senator demonstrated his fluency in foreign policy and security matters following the assassination of former Pakistani Prime Minister Benazir Bhutto in December.
Bhutto's killing was an "unfortunate event," he said, but McCain's "knowledge and ability to talk about it reemphasized that this is the guy who's ready to be commander-in-chief. And it helped us."
Asked if McCain would stand to benefit from a terrorist attack on U.S. soil, Black answered, "Certainly it would be a big advantage to him."
A McCain campaign official said Black, the former chairman of the lobbying firm BKSH & Associates, does not explicitly remember saying the comment, but does not dispute it. According to the official, he was trying to emphasize that McCain is favored on national security issues.
On the day of Bhutto's December assassination, McCain seemed to suggest the calamity could offer him some political benefit.
"I'm the one with the experience, the knowledge and the judgment," he told CNN's Dana Bash. "So perhaps it may serve to enhance those credentials."