Mr Black later said his remarks were "inappropriate"
A top adviser to John McCain has apologised for saying a terrorist strike on the US would benefit the Republican presidential candidate.
Charlie Black said he regretted the remarks to Forbes magazine in which he said a new attack on US soil would be a "big advantage" for Senator McCain.
Mr McCain said he found it hard to believe Mr Black had made such comments with which he "strenuously disagreed".
Democrat Barack Obama's campaign said Mr Black's comments were a "disgrace".
Followers of Mr McCain - a former US Navy pilot and Vietnam prisoner-of-war who has travelled the world while serving in the Senate - say his extensive grounding in foreign affairs gives him an advantage over the less experienced Mr Obama.
Thus, they argue, he benefits any time national security matters are the news of the day.
But questioned about Mr Black's comments, Mr McCain told reporters: "I cannot imagine why he would say it. It's not true.
"I've worked tirelessly since 9/11 to prevent another attack on the United States of America. My record is very clear."
Mr Black said: "I deeply regret the comments. They were inappropriate.
"I recognise that John McCain has devoted his entire adult life to protecting his country and placing its security before every other consideration."
Mr Obama's spokesman, Bill Burton, said: "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."
The row came as Mr McCain tried to focus on energy issues.
He said that if elected, he would offer a $300m (£150m) reward to anyone who developed a more efficient electric car battery.
Meanwhile, Mr Obama's team has announced that he will be attending a campaign event with his former rival for the Democratic presidential nomination, Hillary Clinton, in New Hampshire on Friday.
In what observers say is an attempt to bring the party together after the divisive primary battle between the two candidates, the event will be taking place in the town of Unity, where both Mr Obama and Mrs Clinton received 107 votes in January's New Hampshire primary.
The rally will be the first time Mrs Clinton has appeared on the campaign trail on behalf of Mr Obama since she ended her presidential bid on 7 June.