Farahi, right, freed after two years but it is still not clear who was behind his abduction and if a ransom was paid [EPA]

Afghanistan's ambassador-designate to Pakistan, who was abducted two years ago before taking up his post, has been freed, the foreign ministry in Kabul has announced.

The foreign ministry in Kabul said on Sunday in a statement that he was "freed on November 13 (Saturday) after more than two years and returned to his country and family".

Abdul Khaliq Farahi, who was the consul-general in the city of Peshawar, northwest Pakistan, was snatched at gunpoint there after his vehicle was ambushed in September 2008.

His driver was killed.

Farahi was handed over to the Afghan authorities in the eastern border province of Khost, said a local Afghan official, who asked not to be named.

A family member, also requesting anonymity, confirmed to the AFP news agency that Farahi was released and that he was in good health.

The Afghan government expressed their thanks for the efforts of the Pakistani government for the safe release of the diplomat, the statement said.

Farahi was returning to his home in a suburb of Peshawar when he was seized but it is not yet clear who was behind his abduction and if a ransom was paid to secure his release.

An Afghan government official said Farahi had met Hamid Karzai, the Afghan president, on Sunday.

Source: Agencies