By Mehreen Zahra-Malik and Amjad Ali

ISLAMABAD (Reuters) - Five Pakistanis and a Russian who were captured by the Afghan Taliban after their government helicopter crashed in eastern Afghanistan have been released and returned to Pakistan, the foreign ministry said on Saturday.

The Russian-made transport helicopter belonging to the Punjab provincial government was en route from Peshawar in northwest Pakistan to Uzbekistan for maintenance on Aug. 4 when it suffered a technical failure and crash-landed in a Taliban-held area of Logar province in eastern Afghanistan.

The crew's release was arranged through a handover between tribes in the border region, from where they were transferred to Islamabad by helicopter, the ministry said in a statement.

"The six member crew of Punjab government helicopter that went missing in Afghanistan on 4th August 2016 has been recovered and arrived in Islamabad today," it said.

Whereas Pakistan acknowledges that it wields some influence with the Afghan Taliban, it denies Afghan and U.S. accusations that it provides support and sanctuary for the Afghan Taliban and its leaders.

Pakistan says it has been a victim of terrorism, much of it from groups based in Afghanistan, for years.

Initial reports after the crash had indicated that there were seven passengers but Foreign Ministry spokesman Nafees Zakaria said on Saturday that it turned out there were only six on board.

One of the seven people listed on the flight manifest had been unwell and decided not to fly, a ministry official said on condition of anonymity.

(The story corrects that helicopter crashed in Taliban-held area of Logar province. Taliban do not control all of Logar province)

(Additional reporting by Saud Mehsud. Writing by Kay Johnson and Mehreen Zahra-Malik; Editing by Simon Cameron-Moore and Adrian Croft)