Afghan President Hamid Karzai on Sunday called on Pakistan's incoming government to help negotiate an end to the Taliban insurgency that has ravaged his country for nearly 12 years.
Taliban militants use Pakistan's border areas as a refuge to launch attacks across Afghanistan's south and east, and elements of the Pakistani state are accused of providing tacit support for the Islamist extremists.
Pakistan is suffering from its own domestic Taliban insurgency and has accused Afghanistan of providing shelter to some wanted commanders.
"We hope that the government paves the way for peace and brotherhood with Afghanistan and cooperates in fighting terrorism and sincerely rooting out terrorist sanctuaries," Karzai said.
The two countries need to work together to be "saved from the menace of terrorism", he said in a statement, welcoming Saturday's high voter turnout as a sign that people wanted democracy despite threats from militants.
The West sees Pakistan's involvement as crucial to securing a peace settlement in Afghanistan, where the Taliban have fought against US-led troops since 2001.
But Afghanistan has accused Pakistan of imposing impossible conditions on peace talks, and small-scale border clashes have erupted in the latest sign of frayed tensions.
Nawaz Sharif's election victory is unlikely to see a radical change in Pakistan policy with regards to Afghanistan as commentators say there is a wide degree of consensus on trying to assist peace efforts.
Peace talks have also failed to start due to the Taliban's refusal to negotiate with Karzai, whom they dismiss as a puppet of the US.
Islamabad backed the 1996-2001 Taliban regime in Afghanistan and is seen in Kabul as keeping close ties with militant leaders ahead of the withdrawal next year of all international combat troops.