UN Secretary General Antonio Guterres has urged India and Pakistan to take immediate steps to defuse tensions and offered to help broker a solution.

"We are deeply concerned at the increasing tensions between the two countries," said UN spokesman Stephane Dujarric.

Mr Guterres "stresses the importance of both sides to exercise maximum restraint and take immediate steps" to de-escalate, while also offering to mediate "should both sides ask," said Mr Dujarric.

The two countries have been locked in a diplomatic clash following a suicide attack in Kashmir a week ago that killed 40 Indian security personnel, triggering counter-operations by Indian forces in the area.

Kashmir has been split between India and Pakistan since independence from Britain in 1947.

Both countries claim the former Himalayan kingdom in full and have fought two wars over it.

India has long accused Pakistan of harboring militants who launch attacks on its soil.

Pakistan's UN Ambassador Maleeha Lodhi met Mr Guterres and the president of the Security Council to appeal for action, warning that a flare-up in Kashmir could undermine peace efforts in Afghanistan.

The United States is holding talks with the Taliban on ending 17 years of war. 

US envoy Zalmay Khalilzad's talks also involve Pakistan, Saudi Arabia and the United Arab Emirates, the three countries that recognized the Taliban regime in Kabul before the US-led coalition toppled it following the September 11, 2001 attacks.