The Pakistani Army chief offered Islamabad's support for the Afghan peace process in a meeting with President Ashraf Ghani in Kabul on May 10 amid growing violence as the United States withdraws its troops.
The British chief of defense staff also attended the meeting.
Pakistan is a key player in moves to resolve the conflict between the Western-backed government and the Taliban insurgents.
In the past, Islamabad has been accused of harboring the Taliban but in recent years Washington and other Western powers have acknowledged its efforts to push the militant group to take part in peace talks.
Pakistani Army Chief of Staff General Qamar Javed Bajwa reiterated to Ghani that "a peaceful Afghanistan means a peaceful region in general and a peaceful Pakistan in particular," a Pakistani military statement said.
"We will always support 'Afghan led-Afghan owned' Peace Process based on mutual consensus of all stakeholders," it said.
Bajwa was accompanied by British Chief of Defence Staff General Nicholas Patrick Carter. Britain still has troops in Afghanistan in a war that started with the overthrow of a Taliban government following the 2001 attacks by Islamist militants in the United States.
In recent weeks, Pakistan has been negotiating with the insurgents to try to get them to commit to a cease-fire, Taliban and diplomatic sources have told Reuters.
Pakistan is also trying to persuade them to agree to an extension of the U.S.-Taliban agreement, which stipulated U.S. and other foreign forces should withdraw by May and to continue to take part in planned peace talks in Turkey.
But violence has risen starkly in recent weeks as the U.S. forces pull out.
The Taliban announced on May 9 they would commit to a three-day cease-fire for the Muslim religious holiday of Eid later this week.
Afghanistan's presidential palace said on May 10 the security forces would also observe the cease-fire.