Afghan President Hamid Karzai asked Pakistan on Monday to help arrange peace talks between his government and Taliban insurgents, and called for a joint campaign against extremism in both countries.
Karzai was visiting Islamabad to hold his first talks with newly elected Prime Minister Nawaz Sharif, despite a series of public rows that have hampered efforts to end 12 years of war in Afghanistan.
Kabul was infuriated by the opening in June of a Taliban office in Qatar, considered a precursor towards talks with US officials. He now wants Pakistan to help open dialogue with the militia, which has publicly refused all contact with his government.
Elements of the Pakistani state are widely accused of funding, controlling and sheltering the Taliban. Islamabad says publicly it will do anything to stop the fighting in Afghanistan.
Karzai said Afghanistan expected Pakistan to provide opportunities or a platform for talks between the Afghan High Peace Council -- Kabul's official negotiators -- and the Taliban.
"We hope with this on top of our agenda we can move forward in bringing stability and peace to both countries," he told reporters.
In the past, the Afghan leader has identified Taliban havens in Pakistan as the main cause of increased violence in his country.
On Monday he acknowledged that the "continued menace of terrorism" was a primary concern for people in Pakistan, where thousands have been killed in the last decade, as well as in Afghanistan.
"It is this area that needs to have primary and focused attention by both governments," Karzai said.
"It is with hope on this that I have come to Pakistan... to advance the course of action together... but also by having a common campaign against extremism, (to) make sure that the two countries are safer and prosperous towards a secure future."
Sharif wished Afghanistan well in the transition from NATO to Afghan security control and reiterated support for peace and reconciliation to be "Afghan-owned and Afghan-led".
"I assured President Karzai that Pakistan will continue to extend all possible facilitation to the international community's efforts for the realisation of this noble goal," he said.
"I also reaffirmed Pakistan's strong and sincere support for peace and reconciliation in Afghanistan."
But there are question marks over what Pakistan can deliver. Analysts say it can encourage and provide logistical support for Taliban peace talks, but cannot force them to negotiate against their will.
The Taliban have publicly refused to have any contact with Karzai's government, branding it a puppet of the United States.
Afghan government peace negotiators accompanying Karzai have called for the release of the most senior Taliban figure detained in Pakistan, former deputy leader Abdul Ghani Baradar.
No mention was made about prisoner releases in the short statements made by Sharif and Karzai. Questions were not allowed.
Pakistan released 26 Taliban prisoners late last year, including the militants' former justice minister Nooruddin Turabi.
Afghan officials believe the releases can encourage former detainees to talk to the Kabul government, although observers say there is little evidence those hopes have been realised. Several prisoners are also understood to have returned to the battlefield.
On Sunday, the Afghan Analysts Network think-tank said attempts to go through Pakistan to reach the Taliban leadership are not new and similar moves have been unsuccessful in the past.
Last month Karzai's chief of staff Karim Khorram claimed the Taliban office in Doha was part of a plot to break up Afghanistan, orchestrated by either Pakistan or the United States.
Pakistan's Dawn newspaper on Monday warned of complications in Afghanistan and Pakistan working more closely together.
Karzai is due to step down at presidential elections in April, Pakistan's new government is still grappling with policy and its powerful army is preparing to change its commander later this year.
"Hope for the best, but prepare for continuation of the status quo -- that may be the best approach," Dawn said.