PESHAWAR (Agencies) - Taliban militants have released a Chinese engineer six months after he was abducted in northwest Pakistan, security officials said Sunday. Militants abducted two Chinese men who had been checking a Pakistani telecommunications installation in the area on August 29. Both men tried to escape in October. One managed to find his way to an army post while the other was recaptured after injuring his leg falling down a steep mountain slope. The man was released on late Saturday and shifted to Peshawar and later to Islamabad. An official, who requested anonymity, said the Chinese engineer was unwell. He gave no details and the Pakistan Foreign Ministry did not immediately comment. A Taliban spokesman in the troubled Swat valley, Muslim Khan, said the engineer had been freed as a 'goodwill gesture'. "He was handed over to local administration officials in Barikot town of the Swat Valley," Khan told reporters. The state-run Associated Press of Pakistan news agency quoted the Chinese embassy as saying later that the Chinese engineer, Long Xiaowei, was released on Saturday and he has safely reached the Chinese embassy. He will go back to China soon to join his family, it said. "This embassy along with Mr Long wishes to express sincere thanks to the efforts by relative departments of Pakistan for his safe release," a Chinese embassy statement said.