Former Afghan Taliban second-in-command Mullah Abdul Ghani Baradar is to be released from prison in Pakistan on Saturday, the foreign ministry says.
A spokesman said the release was to “further facilitate the Afghan reconciliation process”.
Mullah Baradar is one of the four men who founded the Taliban movement in Afghanistan in 1994.
He became a linchpin of the insurgency after the Taliban were toppled by the US-led invasion in 2001.
He was captured in the Pakistani city of Karachi in 2010.
Afghan officials said at the time that he had been holding secret peace talks with the Afghan government and accused Pakistan of trying to sabotage or gain control of the process.
Correspondents say he has since emerged as a figure who Afghanistan and Pakistan believe could help persuade Taliban fighters to lay down their weapons and join peace talks.
A mid-level Afghan Taliban official told the AFP news agency that Mullah Baradar’s release would not have any effect on events in Afghanistan.
“[It] won’t change anything: he will be just a simple guy with no position in the Taliban network,” he said.
It is not clear where Mullah Baradar will be sent after his release.
A Pakistani official and a Taliban source in north-west Pakistan told AFP that he is likely to stay at home in Karachi where his family lives.
“He will be kept as a simple guy in the network who can convey messages from time to time, but who will not be able to reintegrate the shura [Taliban council] and regain power,” the Taliban official said.
Afghanistan wants him repatriated but Pakistani sources said this month he was more likely to be sent straight to a third country such as Saudi Arabia or Turkey.
Friday’s announcement was welcomed by the Afghan government.
“We welcome that this step is being taken,” Aimal Faizi, spokesman for Afghan President Hamid Karzai told AFP news agency.
“We believe this will help the Afghan peace process. This is something we have been calling for for a long time. It was on the agenda when the president visited Pakistan, so we are pleased.”
The Pakistani foreign ministry recently revealed that some 26 Taliban prisoners had been freed over the past year.
Correspondents say that there is little evidence that previous releases of Taliban detainees have had a positive effect on peace negotiations, and several prisoners are understood to have returned to the battlefield.
Analysts say that there is also evidence that Mullah Baradar is not as important for Taliban as he used to be.
In a visit to Islamabad last month, President Karzai urged Pakistan “to facilitate peace talks” between his country and the Taliban.
He said the Pakistani government could provide opportunities for talks between the Afghan High Peace Council and the militants.
In response, Pakistan Prime Minister Nawaz Sharif said he wanted to help regional efforts to stabilise Afghanistan.
Most Nato combat troops are due to pull out of Afghanistan by the end of 2014, leaving the country to handle its own security.