(Bloomberg) -- U.S. President Donald Trump spoke separately on Monday with the leaders of India and Pakistan in a bid to calm tensions between the nuclear-armed neighbors over a territorial dispute.

Indian Prime Minister Narendra Modi has kept Kashmir under lockdown for more than two weeks after scrapping the region’s autonomy, a move condemned by Pakistani Prime Minister Imran Khan.Both nations claim the area, which has triggered two of the three wars they fought since the British left the subcontinent in 1947.

Trump said on Twitter that he spoke to his “good friends” Modi and Khan about getting the two countries “to work towards reducing tensions in Kashmir. A tough situation, but good conversations!”

That might prove difficult.

Khan recently compared Modi’s “Hindu supremacist” government to the Nazis, and said India was suppressing its sizable Muslim minority and endangering regional security. “The world must also seriously consider the safety & security of India’s nuclear arsenal in the control of the fascist, racist Hindu Supremacist Modi Govt,” the Pakistani premier wrote on Aug. 18 in a series of messages. In their latest conversation, Khan told Trump that Pakistan “foresees a humanitarian crisis” arising from India’s “unilateral action” in Kashmir, foreign minister Shah Mahmood Qureshi told reporters late on Monday.

In a statement on Modi’s conversation with Trump, the Indian prime minister’s office did not refer explicitly to a discussion on Kashmir, saying only that “in the context of the regional situation, the Prime Minister stated that extreme rhetoric and incitement to anti-India violence by certain leaders in the region was not conducive to peace.”

Afghanistan Concerns

The speed with which Modi’s government sought to take control in Kashmir may be linked to larger concerns about the U.S. moving out its troops from neighboring Afghanistan, analysts say.

Trump’s comments on Kashmir may also be a way to assure Pakistan that its interests will be safeguarded in return for its help to keep the Taliban in check in Afghanistan, Harsh Pant, professor of international relations at King’s College London, said by phone in New Delhi.

“The larger geopolitics of the region was a major reason for India to immediately push for greater control over Kashmir,” said Pant. “For Trump, his priority is elections. Every time he brings up Afghanistan, Pakistan is bound to bring up Kashmir. But Trump’s comments are mostly optics. Operationally the trajectory of U.S.-India relations remains unchanged.”

The talks between the U.S. and Taliban have taken on greater urgency as Afghanistan heads for presidential elections on September 28. Trump is expected to push Khan to pressure the Taliban into signing a permanent ceasefire in Afghanistan.

“There is clearly a link between India’s Kashmir move and developments in Afghanistan,” Michael Kugelman, a Washington, D.C. based South Asia senior associate at The Wilson Center, said in a message. “The rapidly progressing peace process is increasing the likelihood of a future Afghan government with a prominent role for the Taliban -- a best-case scenario for Islamabad and a worst-case endgame for New Delhi. India, by stripping Kashmir of its autonomous status and delivering a blow to Pakistan, can push back against Islamabad to undercut Pakistan’s strengthened hand in Afghanistan.”

Kashmir Silenced

More than two weeks after the sudden decision to scrap autonomy in Kashmir and bring police and local administration directly under the control of Modi’s federal government, India is yet to release local political leaders who have been detained without legal recourse.

Fixed-line telephones in the valley are working and movement restrictions are being eased, Dilbagh Singh, director general of police for Jammu and Kashmir, confirmed in a text message late Monday. There was no word on when the mobile or internet blackout would be lifted.

Trump’s conversations with the two leaders comes nearly a month after the U.S. president said he would help resolve the Kashmir dispute by mediating talks. The president said he made the offer after being asked to do so by Modi -- a request India vigorously denied making. When India’s foreign minister Subrahmanyam Jaishankar met Secretary of State Mike Pompeo at a recent regional summit, he stressed New Delhi’s longstanding policy of keeping Kashmir issues at a bilateral level.

South Asia analysts downplayed the significance of Trump’s call, saying it wasn’t unusual for U.S. presidents to try and dampen tensions between New Delhi and Islamabad but that it still marks a minor diplomatic win for Pakistan, which generally tries to internationalize the Kashmir dispute.

“Given recent developments, this tweet makes for good optics for Islamabad,” Kugelman tweeted.

Pakistan has been trying to focus international attention to Modi’s sudden decision to scrap seven decades of autonomy held by its Muslim-majority state of Jammu and Kashmir.

“This is a win for Pakistan to internationalize the issue,” said Samiullah Tariq, director of research at the Karachi-based Arif Habib Ltd.

(Updates with Pakistan foreign minister’s comment in fifth paragraph, analyst comments.)

--With assistance from Bibhudatta Pradhan, Faseeh Mangi and Kamran Haider.

To contact the reporters on this story: Archana Chaudhary in New Delhi at achaudhary2@bloomberg.net;Iain Marlow in Hong Kong at imarlow1@bloomberg.net

To contact the editors responsible for this story: Daniel Ten Kate at dtenkate@bloomberg.net, Ruth Pollard

©2019 Bloomberg L.P.