ISLAMABAD/SRINAGAR, India (Reuters) - Prime Minister Imran Khan said on Tuesday Pakistan would retaliate if India attacked in response to a bombing in the disputed Kashmir region, which India blamed on Pakistan.

Khan added that he wanted to cooperate in investigating the suicide bombing on Thursday, when 40 Indian paramilitary police were killed in an attack claimed by the Pakistan-based Jaish-e-Mohammad (JeM) militant group.

Tensions between the nuclear-armed neighbors has risen sharply over the killing in the Indian-controlled part of the disputed Himalayan region of Kashmir.

Pakistani authorities have denied any involvement in the attack and called for United Nations intervention.

But Indian Prime Minister Narendra Modi, facing a general election by May, has come under pressure to exact revenge and has said he has given his security forces a free hand to administer a “strong response.”

Khan, in a televised address to the nation, noted the calls in India for revenge and said he hoped “better sense will prevail.”

“If you think that you will launch any kind of attack on Pakistan, Pakistan will not just think about retaliation, Pakistan will retaliate,” he said. “And after that where will it head?”

The United Nations is “deeply concerned” at the rising tensions and Secretary-General Antonio Guterres is available to mediate if both sides ask, U.N. spokesman Stephane Dujarric said on Tuesday. Earlier, Pakistan’s foreign minister, Shah Mahmood Qureshi, sent a letter to Guterres seeking U.N. involvement.

“The secretary-general stresses the importance for both sides to exercise maximum restraint and take immediate steps to de-escalation,” Dujarric said.

The South Asian neighbors have fought three wars since independence from Britain in 1947, two of them over Kashmir, a Muslim-majority region.

While they have not waged full-scale war since they both tested nuclear weapons in 1998, they have engaged in countless skirmishes along their de facto boundary in the mountains of Kashmir.

The United States, which has condemned the attack as “heinous,” has been in contact with both India and Pakistan to discuss the issue, State Department spokesman Robert Palladino told a briefing.

He said Washington was committed to working with India on counterterrorism and urged Pakistan “to fully cooperate with the investigation into the attack” and to “punish anyone responsible.”

Khan reiterated that Pakistan had nothing to do with the bomb attack and said it was ready to take action against anyone found to be behind it. “If you have any actionable intelligence that Pakistanis are involved, give that to us, I guarantee you that we will take action,” Khan said.

India’s Foreign Ministry spurned the offer, saying Islamabad had failed to act on proof given to it about previous attacks. It said there had been no progress in the Pakistani investigation into the 2008 attacks in Mumbai blamed on another Pakistani Islamist militant group.

“Promises of ‘guaranteed action’ ring hollow given the track record of Pakistan,” the ministry said in a statement.

Pakistan’s military has a long record of nurturing militants as proxies in pursuit of foreign policy objectives, and India has for years accused Islamabad of supporting jihadists waging a nearly 30-year revolt in its only Muslim-majority state.

Slideshow ( 9 images )

Muslim Pakistan has long said it only provides moral and diplomatic support to the Kashmiri people in their struggle for self-determination, though that has never dispelled India’s conviction of Pakistani support for militants.

Khan said his country had changed. “I am telling you clearly that this is new Pakistan. This is a new mind set, this is new thinking,” he said.

“SURRENDER OR BE KILLED”

Indian security forces intensified a crackdown in response to the deadliest attack on security forces in three decades of insurgency in Kashmir.

Slideshow ( 9 images )

Lieutenant-General K.J.S. Dhillon, India’s top military commander in Kashmir, accused Pakistan’s main Inter-Services Intelligence spy agency of “controlling” those behind the Thursday bombing and warned of retribution.

“I would request all the mothers in Kashmir to please request their sons who have joined terrorism to surrender and get back to the mainstream,” Dhillon told reporters in Srinagar, the summer capital of Jammu and Kashmir state. “Otherwise anyone who has picked up the gun will be killed.”

Thursday’s bombing was carried out by a 20-year-old man from a village in Indian Kashmir. His parents said he had joined a militant group after being beaten by Indian troops in 2016.

Dhillon did not provide any proof for his accusation that Pakistan’s military intelligence agency was behind the blast, only pointing to what he said were its close links with the JeM.

The bomb attack has caused outrage in India, with calls for revenge circulating on social media and rising animosity toward Kashmiri Muslims in other parts of the Hindu-majority country, to the alarm of rights groups.

“SENSE OF URGENCY”

The United States had told India it supported its right to defend itself against cross-border attacks, India said.

At the same time, Pakistan has a vital role to play in nudging the Afghan Taliban toward peace in Afghanistan in talks with U.S. officials that have raised significant hopes for an end to America’s longest war.

Pakistan’s ambassador to Afghanistan said an Indian attack on his country would undermine the Afghan peace effort.

“Any attack by India will affect the stability of the entire region and impact the momentum,” the ambassador, Zahid Nasrullah, told reporters in the Afghan capital.

A former deputy Afghan defense minister later said Nasrullah’s remarks would anger local government officials, saying it played into fears that the country’s long-running civil war was a proxy for rivalries by regional powers.

“A Kashmir problem should be solved in Kashmir, and not on Afghanistan soil,” Tamim Asey told Reuters. “We don’t want to be your battleground.”

Pakistan’s close ally China urged it and India to ease tension through talks. “China hopes that Pakistan and India can exercise restraint and hold dialogue to achieve a ‘soft landing’ as soon as possible,” said China’s Foreign Ministry spokesman.