Observers believe Mr Azizuddin was released as part of a prisoner swap
Afghan security forces have rescued two foreign contractors who were kidnapped near the western city of Herat almost a month ago, officials have said.
The intelligence chief in Herat, Habib Habib, said his agents had raided a cave where the men were being held and arrested the leader of the kidnap gang.
The Indian and Nepalese men, who worked for a US security company, are well.
Pakistan's ambassador has meanwhile returned home after being freed by the militants who abducted him in February.
Tariq Azizuddin said he had been released in the Pakistani tribal area of north Waziristan on Friday, but was vague about the identity of his kidnappers.
In April he appeared in a video on al-Arabiya TV, in which he said that had been taken by "mujahideen from the Taleban". But speaking to reporters in Islamabad on Saturday, he identified them only as "Pakistani mujahideen".
Mr Azizuddin disappeared on 11 February along with his driver and bodyguard while travelling by car from Pakistan to the Afghan capital, Kabul.
He said his release had been the result of a "chain of actions set about on the order" of the Pakistani prime minister and his government, but declined to elaborate.
But the adviser of Pakistan's interior ministry, Rehman Malik, said there had been no deal or "exchange of terrorists", merely a "law enforcement action".
The BBC's Barbara Plett in Islamabad says informed observers suspect Mr Azizuddin was released as part of a prisoner swap between the authorities and local pro-Taleban militants, who are engaged in peace talks.