A furious diplomatic row erupted between London and Islamabad tonight after David Cameron accused elements of the Pakistani state of promoting the export of terrorism.

Speaking on his visit to neighbouring India, the prime minister launched the strongest British criticism yet of Pakistan, warning that the country could no longer "look both ways" by tolerating terrorism while demanding respect as a democracy.

Angry responses followed from Pakistani officials in the UK and the foreign ministry in Islamabad. The row comes as Pakistan's president, Asif Ali Zardari, prepares to visit Britain next week. He is due to stay at the prime minister's country retreat of Chequers.

Writing for the Guardian's Comment is free site, Pakistan's high commissioner to Britain accused Cameron of damaging the prospects for regional peace and criticised him for believing allegations in the secret military logs of the Afghanistan conflict published earlier this week.

The leaked documents suggest that the ISI, one of Pakistan's two military intelligence agencies, was encouraging the Taliban as recently as last year.

Wajid Shamsul Hasan, Pakistan's high commissioner, wrote: "One would have wished that the prime minister would have considered Pakistan's enormous role in the war on terror and the sacrifices it has rendered since 9/11.

"There seems to be more reliance on information based on intelligence leaks which lack credibility of proof. A bilateral visit aimed at earning business could have been done without damaging the prospects of regional peace."

The prime minister initiated the row this morning in a speech to Indian business leaders in Bangalore, when he spoke of his horror at the 2008 terrorist attacks in Mumbai for which Delhi directly blamed the Pakistani authorities.

Cameron came close to endorsing that view when he said: "We cannot tolerate in any sense the idea that this country is allowed to look both ways and is able to promote the export of terror, whether to India or Afghanistan or anywhere else in the world.

"That is why this relationship is important. But it should be a relationship based on a very clear message: that it is not right to have any relationship with groups that are promoting terror. Democratic states that want to be part of the developed world cannot do that. The message to Pakistan from the US and from the UK is very clear on that point."

Pakistan took the rare step of issuing an official rebuttal. Abdul Basit, a spokesman for the Pakistani foreign ministry, told Radio 4's World at One: "There is no question of Pakistan looking the other way. I think the prime minister was referring to these reports, which are unverifiable and outdated. If we start drawing inferences from these self-serving reports, then obviously we are distracting ourselves."

Pakistani senator Khurshid Ahmad, vice-president of the Islamist Jamaat-e-Islami party, said: "I am deeply concerned. The basis on which this statement has been made is very fragile. The documents released are unreliable: 90% of them have been attributed to Afghan intelligence agencies, whose reports are totally unreliable and fabricated. On the basis of such a report, it is not acceptable to make the statement that has been made."

Britain has spoken in the past of the terror threat from Pakistan, though ministers have restricted themselves to criticising Pakistan for tolerating terror groups. But the prime minister's language came close to endorsing the Indian view that authorities in Pakistan have a hand in the terror.

Cameron named several terror groups which are, according to India, sponsored by Pakistan. "We – like you – are determined that groups like the Taliban, the Haqqani network or Lakshar-e-Taiba should not be allowed to launch attacks on Indian and British citizens in India or in Britain."

Downing Street insisted the prime minister was not accusing Pakistan's government of sponsoring terrorism. But a few minutes after his speech, Cameron made clear that official agencies in Pakistan were responsible for harbouring terrorists.

Asked on the Today programme whether Pakistan exports terrorism, Cameron said: "I choose my words very carefully. It is unacceptable for anything to happen within Pakistan that is about supporting terrorism elsewhere. It is well-documented that that has been the case in the past, and we have to make sure that the Pakistan authorities are not looking two ways. They must only look one way, and that is to a democratic and stable Pakistan."

The prime minister's words on Pakistan overshadowed the first day of a visit to India designed to herald a new special relationship. Downing Street says the trip is meant to show that Britain can treat India as a normal trading partner, with the security issues surrounding Delhi's troubled relations with Pakistan dealt with on a separate tack.

But the main business announcement – a relaxation of licence rules to allow the export of civil nuclear technology and expertise to India – had the potential to upset its nuclear neighbour. Pakistan and India have refused to sign the nuclear non-proliferation treaty, prompting the last Labour government to refuse to co-operate with India on civil nuclear power. Ministers had feared there would be leakage to its military nuclear programme.

The US sanctioned the use of civil nuclear technology to India in 2008. Britain believes today's agreement is compatible with the NPT, which bans the sale of nuclear technology to nuclear powers that have not signed it.