| Follow us on Twitter |
Mohammad Naeem, governor of Jaghato district in Wardak province, says Rudolf Blechschmidt, 62, is in good health.
"The German engineer along with four Afghan hostages were freed in exchange for five Taliban prisoners," he said.
Mr Naeem said the exchange happened at the government intelligence office in the provincial capital Maidan Shah about 60 kilometres east of Kabul.
He says the five prisoners freed for the hostages are "not very important Taliban commanders but they are related to the abductors of the German engineers".
A Taliban commander who was involved in the kidnapping, Mullah Baheer, confirmed the release to AFP, saying: "The job is done. We handed the hostages to tribal elders and they handed to us our five prisoners."
A German official in Kabul has also confirmed to AFP the engineer was free. "He is fine. He is on his way to Kabul," he said on condition of anonymity.
He says it is too early to say if and when Mr Blechschmidt will leave for Germany.
Mr Blechschmidt was captured in Wardak on July 18 with another German who fell sick and was shot dead. The men were seized with five Afghan colleagues, one of whom escaped.
They were taken a day before Taliban insurgents abducted 23 South Koreans in adjoining Ghazni province.
The rebels killed two of the South Koreans after the Afghan Government steadfastly refused to meet their demand for the release of Taliban prisoners.
The Afghan Government came under heavy international criticism for freeing five senior rebels in March to free an Italian hostage whose driver and interpreter were beheaded.
The surviving South Korean aid workers were eventually freed in August after direct talks between the Taliban and South Korea that reached a secret deal.
The Taliban said afterwards that the kidnapping of foreign nationals was an effective measure to pressure the Government.
Visit from news agency
An Afghan news agency reported on Monday that it was able to visit Mr Blechschmidt and the others and they were being held in a dark room in a cold, mountainous area. They again pleaded for their release.
Four workers of the International Committee of the Red Cross were abducted on September 26 while returning from a mission to try to free the group.
The Taliban said the four ICRC staff - two of them foreigners - were captured "by mistake." They were released after three nights.
In a video broadcast on Afghan television in August, Mr Blechschmidt - who is said to suffer heart problems - was shown slumped over and coughing.
Speaking with apparent difficulty, he said he was ill and urged the Afghan Government and German embassy to do all they could to secure his release.
"I'm a prisoner. My health condition is not good, I'm in a bad condition," he said in the video shown by Tolo television station, which was less than two minutes long.
"I'm a friend of the Afghan people and I want the Government of Afghanistan and the German embassy in Kabul and the German Government to help me win my freedom," he said. © 2007 Australian Broadcasting Corporation