Afghan President Hamid Karzai urged Pakistan on Monday to help arrange peace talks between his government and the Taliban, then took the rare step of extending his visit.
Karzai came to Islamabad to meet newly elected Prime Minister Nawaz Sharif in a bid to overcome a series of public rows that have hampered efforts to end 12 years of war in Afghanistan.
Infuriated by the opening in June of a Taliban office in Qatar, considered a precursor towards talks with US officials, Karzai now wants Pakistan to help open dialogue with the militia.
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.
But analysts doubt Pakistan has the influence to force the Taliban to the negotiating table and the insurgents have publicly refused all contact with Karzai's government, branding it a US puppet.
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 questions over what Pakistan can deliver. Many analysts believe at most Pakistan can encourage and provide logistical support for Taliban peace talks.
There was no immediate reaction from the Taliban, who have publicly shunned all previous offers of talks.
Later on Monday, Afghan and Pakistani officials told AFP that Karzai had extended his one-day visit in the hope of having fresh talks with Sharif on Tuesday.
He would spend the night at the Pakistani hill resort of Murree, a short drive from the capital and popular with holidaymakers for its balmy summer climes in the mountains, Pakistani officials said.
He extended his trip for another day at Sharif's request, an official in Karzai's office told AFP. "He was asked to stay by Nawaz Sharif for more talks," he added.
Pakistani foreign ministry spokesman Aizaz Ahmed Chaudhry told AFP that Karzai was in Murree and would return to Kabul on Tuesday.
"We expect him to meet Prime Minister Nawaz Sharif tomorrow in Murree. The confirmation of this expected meeting and schedule of other activities will be available tomorrow," said an official in Sharif's office.
Afghan government peace negotiators accompanying Karzai earlier 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.
Afghan officials believe former detainees may 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.