Speaking at the end of a day-long visit to Pakistan, the Republican senator said a worsening of relations between the two nuclear-armed neighbours would be a victory for the perpetrators of the attacks.
'One of the major goals of the outrageous attacks was to reverse the trend... and the progress that has been made in the Indian and Pakistani relations,' he said late on Saturday, according to Pakistan's APP news agency.
'If the terrorists succeed in confounding relations between these two great countries, they will achieve their aim. We cannot let that happen.'
Mr McCain, along with fellow US senators Joe Lieberman and Lindsay Graham, held talks with Prime Minister Yousuf Raza Gilani on relations with India and the security situation in Pakistan.
Their visit came on the heels of one last week by US Secretary of State Condoleezza Rice to keep a lid on tensions between India and Pakistan, which have fought three wars since 1947.
It also came as Pakistan's ambassador to Britain said officials feared India was planning a military strike after saying that all of the Mumbai attackers, who killed 163 people in a three-day siege, had come from Pakistan.
Mr Gilani told the US senators that Pakistan was determined to maintain good relations with India, the government said in a statement.
He also called on Pakistan's allies to help with its efforts to root out extremism and terrorism. -- AFP