"That old Beach Boys song, 'Bomb Iran'?" McCain said in response to a question about US policy on its diplomatic pariah at an electoral campaign meeting in the state of North Carolina.
His questioner had struck an anti-Iran tone, asking him when the United States was going to "send an air mail message to Tehran," drawing cheers from the crowd.
McCain then briefly sang "Bomb, bomb, bomb" -- an adapted snippet of the rock 'n' roll band's refrain "Ba-ba-ba, Ba-Barbara Ann" -- winning laughter from the audience.
The performance was filmed and posted by users on the video-sharing website YouTube. One posting presented an edited version of the clip, with added photographs of children suffering from injuries cause by violence in Iraq.
"Iran is dedicated to the destruction of Israel," McCain went on in a serious tone, however.
"That alone should concern us, but now they are trying for nuclear capabilities. I totally support the president (George W. Bush) when he says we will not allow Iran to destroy Israel."
McCain is the Republican candidate most supportive of the war in Iraq, though he has harshly criticized President George W. Bush's handling of it.
He has long been seen as a likely favorite on the Republican side for the 2008 US presidential race, but recently has scrambled to overhaul his campaign strategy as he lags behind in fundraising and in the polls.
McCain's campaign spokesman Kevin McLaughlin told ABC news that the senator "was just trying to add a little humor to the event."
Copyright © 2007 Agence France Presse.