Prime Minister Narendra Modi has called for dialogue with Pakistan in a letter to its newly elected leader and Pakistan also saw talks with its old rival as the "only way forward", Pakistan's foreign minister said on Monday.
New Pakistani Prime Minister Imran Khan offered an olive branch to India after his election victory last month, proposing talks to resolve a long-standing dispute over the Kashmir region. The two leaders spoke by telephone late last month.
"The Indian prime minister has sent a letter in which he congratulated Imran Khan and ... he has sent a message to open talks," Pakistani Foreign Minister Shah Mehmood Qureshi told reporters in the capital, Islamabad.
An Indian foreign ministry official confirmed Modi wrote to Khan on Saturday and "expressed India's commitment to build good neighbourly relations between India and Pakistan and pursue meaningful and constructive engagement for the benefit of the people of the region".
The nuclear-armed neighbours have fought three wars since the end of British colonial rule in 1947, two of them over the disputed Muslim-majority Himalayan region of Kashmir, where their two armies face off other and occasionally exchange fire.
India has long accused Pakistan of encouraging separatist Muslim militants fighting Indian rule in the Indian part of Kashmir. The militants occasionally launch bloody attacks in Indian towns and cities.
Afghanistan has also for years accused Pakistan of supporting Taliban militants fighting the Indian- and Western-backed Kabul government.
Pakistan denies aiding insurgent groups in both Kashmir and Afghanistan.
Khan, in his offer to India last month, said Pakistan was ready to respond positively to any effort on dialogue.
"If India comes and takes one step toward us, we will take two," said Khan, who had been bellicose towards India while campaigning for last month's election.
Qureshi repeated a call for a resumption of talks, which have made little progress in recent years.
"We need a continued and uninterrupted dialogue. This is our only way forward," he said.
But Pakistani security policy is largely determined by its powerful military, not by civilian governments.
Pakistan's former civilian government, let by Prime Minister Nawaz Sharif, also sought better ties with India.
Hopes soared following a surprise visit by Modi to Sharif in the eastern Pakistani city of Lahore in December 2015, the first such visit by an Indian prime minister in more than a decade.
But the hopes unravelled weeks later when militants attacked an Indian army base in Indian-controlled Kashmir.
India blamed Pakistan for the attack. Pakistan denied that.
Sharif's efforts to improve ties with India were seen as undermining his relations with his army.
Qureshi, who served as foreign minister in a previous civilian government, from 2008 to 2011, said his ministry would be in charge of foreign policy, but would take advice from "national security institutions", drawing a comparison to the way the U.S. Central Intelligence Agency advises the U.S. government.He said he would soon visit Afghanistan bearing a message of friendship and "new beginnings".