Pakistan’s prime minister Imran Khan has congratulated his Indian counterpart for success in a massive general election.

With early election results showing prime minister Narendra Modi and his Hindu nationalist party with a commanding lead, former cricketer Mr Khan tweeted that he looked forward to working with Mr Modi “for peace, progress and prosperity in South Asia”.

Pakistan and India have a history of bitter relations.

The two nuclear-armed rivals were close to a major conflict in February when Indian aircraft launched a strike in Pakistan in response to a February 14 suicide bombing in the Indian-controlled portion of Kashmir that killed 40 troops.

India blamed the bombing on Pakistan-based militants.

Pakistan retaliated by shooting down a fighter jet the next day and detaining its pilot, who was later returned to India.

Since then tension has eased between them.