New Delhi, India (CNN) -- Britain's prime minister delivered a sober message Wednesday to Pakistan: Don't export terror.
"We want to see a strong and a stable and a democratic Pakistan," David Cameron said in Bangalore, India, "but we cannot tolerate in any sense the idea that this country is allowed to look both ways and is able in any way to promote the export of terror, whether to India or whether to Afghanistan, or anywhere else in the world."
Cameron made several remarks in a speech and a question and answer session. A transcript of his comments were posted on the prime minister's website.
"The 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, and the message to Pakistan from the U.S. and from the U.K. is very clear on that point," he said.
His remarks come as the military documents divulged by WikiLeaks include indications that Pakistan's spy service, the Directorate of Inter-Services Intelligence, or the ISI, may have been helping militants in Afghanistan, an assertion strongly disputed by Pakistani officials.
The United States has been working to help bolster the Pakistani government's efforts to battle Taliban and al Qaeda elements in the country. The NATO-led command has been focused on insurgents operating along the Afghan and Pakistani border, and India has long been concerned about militancy in India that comes from Pakistan.
He also said that India and Britain must work closer on security, saying "the terrorists we face are adept at crossing borders, communicating globally, and concocting the most abhorrent plans to destroy our way of life."
"Five years ago, 52 people were killed on the tube and on a bus in London. And in November 2008, we watched in horror as terrorists went on the rampage in Mumbai, killing scores of Indians and three British nationals. As you know, we worked with your government in the investigation into these events," Cameron said. "We remain determined that those responsible must be brought to justice."
He said that when it comes to protecting their mutual citizenry, developments in Afghanistan and Pakistan can't be "overlooked."
"Let me state clearly: your relations with those two countries are a matter for you and you alone. But let me also say we, like you, want a Pakistan that is stable, democratic and free from terror. We, like you, want an Afghanistan that is secure, free from interference from its neighbors and not a threat to our security. We, like you, are determined that groups like the Taliban, the Haqqani network or Lashkar-e-Tayyiba should not be allowed to launch attacks on Indian and British citizens in India or in Britain. Neither should they be able to do so against our people, whether soldiers or civilians, from both our countries who are working for peace in Afghanistan. Our interests are your interests, so let us work together to realize them."
When asked about Cameron's remarks, a spokesman for Pakistan's Ministry of Foreign Affairs said Britain and Pakistan "have a robust and comprehensive partnership, including on counter-terrorism."
"Terrorists have no religion, no humanity, no specific ethnicity or geography. Terrorists' networks, as the U.K. knows full well mutate and operate in different regions and cities. The genesis of terrorism as a global phenomenon warrants close attention. Pakistan is as much a victim of terrorism as are Afghanistan, India or other countries," the statement said.
"Pakistan has done much more than any other country in combating terrorism. Our people and security forces have rendered innumerable sacrifices. We hope that our friends will be able to persuade India to view this issue objectively and the value of 'cooperation' in counter-terrorism."
Pakistan has a troubled history with India, and in the past India has accused the ISI of supporting militant separatists in Indian-administered Kashmir.
Pakistan and Afghanistan also have a tumultuous past. During the Soviet occupation of Afghanistan in the 1980s, religious schools in Pakistan helped train fighters who battled the Soviets.
After the Taliban took over Afghanistan in 1996 and imposed fundamentalist rule, Pakistan was one of the few countries that recognized the regime diplomatically.
It dropped its support after the September 11, 2001, terrorist attacks on Washington and New York.
Lashkar-e-Tayyiba, which means "Army of the Pure," was blamed for the November 2008 Mumbai attack in which nearly 200 people were killed over three days. The man regarded as the group's leader says it wasn't involved in the act despite evidence to the contrary.
Experts say that group claims it is focused on the same issue as it was when created: freeing the disputed territory of Kashmir from Indian rule -- a dispute that has been the source of great tension between India and Pakistan for decades.
Security isn't the only item on Cameron's agenda. He intends to boost business and trade ties, and will meet Indian Prime Minister Manmohan Singh on Thursday.
Cameron visited Turkey a day earlier, where he pushed for Turkish membership in the European Union and also addressed world crises including the tensions in the Palestinian territory of Gaza, which he labeled a "prison."