The heads of the army and Inter-Services Intelligence (ISI) spy agency were personally involved in bringing about talks between the Afghan Taliban and Kabul government on July 8 near Islamabad, said two senior officials close to the process.
The negotiations were a tentative first step toward ending war in neighbouring Afghanistan that kills thousands of people each year, as government forces fight Taliban insurgents whose hardline militant regime was toppled in 2001.
Read: Taliban had leadership’s nod for Murree process, says Aziz
A genuine bid by Pakistan to broker peace could help stem violence, although al Qaeda and other groups are active in the region and new Islamic State offshoots add another layer of danger.
The fledgling peace process may yet fail, especially since Afghan Taliban leaders are divided on talks.
Pakistani officials insist the civilian government and military recognise that Afghanistan's war threatens their own security by empowering insurgents who launch deadly attacks on their side of the border.
Army chief General Raheel Sharif in particular has made Afghanistan's peace process a "top foreign policy goal," said a Defence Ministry official, speaking anonymously because he was not authorised to talk to the media.
Read: Taliban, Afghan government talk 'peace' in Islamabad
"For General Raheel, convincing Afghans to end the war is just as important as fighting anti-Pakistani militants," another senior security source said.
"He is the chief who has convinced the army that the militant threat inside Pakistan is as important as the strategic tussle with India."
New leaders
Several current and former officials in Afghanistan, question whether Pakistan genuinely supports dialogue.
"Pakistan is taking this new step under internal and external pressure," said former Afghan interior minister Umar Daudzai.
"We have to wait and see whether the step is of a tactical nature or is a genuine policy shift."
Read: Positive step in right direction: US appreciates Pakistan's role in Afghan peace talks
Pressure from China, a key regional ally and investor, is understood to have played a role in Pakistan's intervention, as Beijing believes militants from its restive Xinjiang region receive training in lawless areas of Pakistan and Afghanistan.
Changes in leadership in Pakistan and Afghanistan also helped pave the way for last week's talks.
In Pakistan, General Raheel became army chief in 2013 and his close ally Rizwan Akhtar took over the ISI the next year. And since Afghan President Ashraf Ghani took office last September, he has made improving relations with Pakistan a priority, in contrast to his predecessor Hamid Karzai.
That has led to condemnation inside Afghanistan, however. A May agreement for the ISI and Afghanistan's spy agency to share information about militants caused a political uproar.
As for India, which fought two wars with Pakistan over Kashmir and blames its neighbour for fomenting unrest there, mistrust runs high, despite a meeting between the two prime ministers at a Russian summit last week.
Read: South Asian engagement: US, UN welcome Nawaz-Modi meeting
"India is very sceptical about this entire thing," said Sameer Patil, fellow for national security studies at Mumbai-based think tank Gateway House.
He added Delhi felt it had been sidelined from the process. US and Chinese observers attended the Taliban talks.
Shared threat
Pakistan backed the Taliban's rise to power in Afghanistan in the 1990s, and many of the movement's leaders are believed to be hiding in the country.
But army attitudes towards militant proxies have changed with the advent of Pakistan's own Taliban movement, which has launched attacks in major cities that killed hundreds of people.
One of the worst attacks in Pakistan's history was on an army-run school in Peshawar last December, killing more than 130 pupils. Months earlier, Pakistan Army had launched an offensive against militants in the North Waziristan region that is still ongoing.
Read: Our darkest hour
Islamabad wants Afghanistan's help in capturing or killing Tehreek-e-Taliban Pakistan chief Mullah Fazlullah, who claimed responsibility for the massacre.
Pakistan also says Afghanistan quietly supports TTP fighting Islamabad. Afghanistan denies this.
Some Western diplomats, long skeptical about Pakistani promises, say Islamabad now seems serious about promoting Afghan stability.
"This is the most genuine push we have seen from Pakistan," said one diplomat.
Read: Murree meet-up: Kabul hopes Pakistan talks will end bloodshed
Pakistani author Ahmed Rashid sees "an institutional change" at the top of the Pakistan military favouring ending Afghanistan's war.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ