Pakistan has set free three Taliban militants, including an important Taliban commander, who were arrested in July, officials said, TehranTimes reported.
Among the freed militants is Commander Maulvi Rafiuddin, a close associate of militant leader, Baitullah Mehsud.
The release was part of a prisoner swap on Wednesday night in which Taliban released 10 Pakistani soldiers, officials said.
The swap took place in the violence-hit Hangu district in the north west.
The district mayor of Hangu, Khan Afzal, told the BBC that the released soldiers included seven personnel of the army and three personnel of the paramilitary Frontier Corps.
He said the swap was negotiated by a tribal council of elders.
Maulvi Rafiuddin and his three companions were arrested by the police in early July in Doaba area of Hangu district.
Hundreds of Taliban surrounded Doaba police station soon afterwards to secure their release, but the authorities shifted the prisoners to a safer place.
Taliban kidnapped over a dozen officials in retaliation, and beheaded three of them when their demand for Maulvi Rafiuddin's release was not met.
The incident sparked military action in Doaba region in which at least 13 soldiers and several Taliban militants were killed.
A senior official, Rehman Malik, told reporters in July that Maulvi Rafiuddin was a ""prized catch"" and the question of his release did not arise.
Police officials in Hangu say nearly 20 kidnapped officials, most of them civilian, are still being held by Baitullah Mehsud's followers.
Mehsud, who leads an alliance of pro-Taliban groups, is accused of masterminding the killing of former Pakistani Prime Minister Benazir Bhutto. He denied involvement in the attack.