Pakistan plans to free Mullah Abdul Ghani Baradar, former Afghan Taliban second-in-command, this month to help advance peace efforts in neighbouring Afghanistan, according to Pakistan's foreign policy chief.
The US and Afghanistan have long pressed Pakistan to free Baradar and other senior Taliban figures who could be used to attract moderate Taliban leaders to the negotiating table and transform the insurgency into a political movement.
"In principle, we have agreed to release him. The timing is being discussed. It should be very soon ... I think within this month," Sartaj Aziz, Pakistani Prime Minister Nawaz Sharif's adviser on foreign affairs, told Reuters news agency.
Aizaz Ahmad Chaudhry, Pakistani foreign ministry spokesman, confirmed to AFP news agency that the decision had been taken to release Baradar "at an appropriate time".
Afghanistan welcomed the move. "The issue of Mullah Baradar is very important to us because his release will help the Afghan peace process," Aimal Faizi, spokesman for Afghan President Hamid Karzai, said.
Karzai has spent years calling for Baradar's release because he believes the Taliban commander is more open to dialogue than many of his comrades.
Zabihullah Mujahid, a Taliban spokesman, said: "We hope that his imprisonment is over".
Baradar's fate is at the heart of Afghanistan's efforts to revive the stalled peace process as most NATO combat troops prepare to pull out of Afghanistan by the end of 2014 and anxiety grows over the country's security.
He was arrested in January 2010 in Pakistan's southern port city of Karachi reportedly in a secret raid by CIA and Pakistani agents, an operation that was described as a huge blow to the group.
Although little is known about Baradar's more recent activity, Interpol has said that Baradar had been a member of the Taliban's so-called Quetta Shura leadership since May 2007.
At the time of his arrest, Baradar was reported to have been second or third-in-command of the Quetta Shura.
Bin Laden associate
The New York Times newspaper, which broke the story of Baradar's arrest, said he was a close associate of Osama bin Laden, al-Qaeda's late leader, before the September 11, 2001, attacks.
After the Taliban government was toppled by the US-led invasion in 2001, hundreds of Taliban fighters were believed to have fled over the border to Pakistan.
Until his arrest, Baradar was a close friend of the group's reclusive leader, Mullah Mohammad Omar who gave him the name "Baradar" or "brother".
He was also the main day-to-day commander responsible for leading the Taliban campaign against the US and NATO troops, plotting suicide bombings and other attacks.
Baradar's arrest saw Pakistan accused of sabotaging initiatives to bring peace in Afghanistan.
In early 2010, the Afghan government and the former UN envoy to Afghanistan said his detention had adversely affected efforts to talk to the fighters.
Many Afghans hope Baradar could act as a go-between with Taliban leaders including Omar but some have doubts over how much clout he still has in the Taliban circles, and indeed how keen he would be to promote peace.
Aziz, the Pakistani PM's adviser, said that Baradar would not be handed over to Afghanistan directly as some in Kabul had hoped, and would instead be released straight into Pakistan.
Aziz's remarks followed last month's trip by Karzai to Pakistan, where he sought the handover of some Afghan fighters as part of the stalled peace process.
Pakistan freed a group of Taliban members on Saturday but once again risked angering the Karzai government by not handing them over directly.
Aziz said it was important to make sure the released Taliban prisoners had a chance to establish contact with their leadership on the ground to persuade them to be part of peace talks - an idea he said Karzai had agreed to.