(Adds statement from PM Imran Khan, background)
By James Mackenzie
ISLAMABAD, May 23 (Reuters) - Pakistani Prime Minister Imran Khan congratulated India's Narendra Modi on Thursday for a triumphant victory that returned him to power in New Delhi after an election fought in the shadow of renewed confrontation between the nuclear-armed enemies.
With official data showing Modi's Hindu nationalist Bharatiya Janata Party (BJP) on course to increase its majority in parliament, Khan said he was ready to cooperate with the government as it resumed office.
"I congratulate Prime Minister Modi on the electoral victory of BJP and allies. Look forward to working with him for peace, progress and prosperity in South Asia," Khan tweeted.
But in a possible warning to India, Pakistan earlier announced that it had conducted a training launch of a Shaheen II, surface-to-surface ballistic missile, which it said is capable of delivering conventional and nuclear weapons at a range of up to 1,500 miles.
"Shaheen II is a highly capable missile which fully meets Pakistan's strategic needs towards maintenance of deterrence stability in the region," Pakistan's military said in a statement that made no direct mention of its neighbour.
On Wednesday, Pakistani Foreign Minister Shah Mehmud Qureshi spoke briefly with his Indian counterpart, Sushma Swaraj, on the sidelines of a meeting of the Shanghai Cooperation Organization member states in the Kyrgyz capital, Bishkek.
"We never speak bitterly, we want to live like good neighbours and settle our outstanding issues through talks," he said following the encounter, in which Swaraj presented him with a gift of sweets.
There was no immediate reaction from the Indian Foreign Ministry on Khan's offer to work with Modi towards peace.
The exchange follows months of tension between the two countries, which came close to war in February over the disputed region of Kashmir, which both sides have claimed since independence from Britain in 1947.
Following a suicide attack in Kashmir that killed 40 members of an Indian paramilitary police force in February, Indian jets launched a raid inside Pakistan, striking what New Delhi said was a training camp of Jaish-e Mohammed, the radical group that claimed the Kashmir attack.
In response, Pakistan conducted a retaliatory strike of its own and jets from the two countries fought a dogfight in the skies over Kashmir during which an Indian pilot was shot down and captured.
Amid international pressure to end the conflict, Pakistan returned the pilot and there were no further strikes but tensions remained high, with regular exchanges of artillery fire from both sides in Kashmir.
Pakistan has also kept part of its airspace closed to international air traffic, disrupting flights to India and other parts of the region.
On Thursday, a Pakistani foreign ministry spokesman said the Kashmir dispute could only be resolved through implementation of U.N. Security Council resolutions that call for an end to hostilities and a plebiscite in the region.
"Dialogue is hence essential. We remain committed to the same, irrespective of whoever forms the new government in India," he told reporters in Islamabad.
Khan has repeatedly offered to start talks with India to resolve the Kashmir issue, which has been the cause of two of three wars between the two sides, and officials have said that they hoped the process could start once the election is concluded.
Last month he said he believed there was more prospect of peace talks with Indian if the BJP won the election.
(Editing by Nick Macfie)
Our Standards: The Thomson Reuters Trust Principles.