Abdul Rahman Mangal said Faiz ul Rahman Wardak, a fourth-year student at Kabul Polytechnic University, was hanged in Sewaka village in Chak district, 60 km (37 miles) outside the Afghan capital.
In a first, Taliban invite journalists to Doha office
He said local Taliban insurgents accused him of being involved in the assassination of a Taliban intelligence official named Mullah Mirwais.
"He wanted to spend his holiday at home but was captured on Thursday by local Taliban and they hanged him in public," Mangal said. "As soon as we got information, we tried to help him but the Taliban hanged him immediately."
Taliban kill 23 civilians in Afghanistan
Photographs apparently showing the body of the man, hanged by the neck from an improvised gallows, circulated on social media.
Zabihullah Mujahid, the main Taliban spokesman, said the case was under investigation. "Once we finish our investigation and fact-finding, we will share the details," he said.
The Taliban, who US authorities say control or contest around a third of Afghanistan, have an extensive presence in Maidan Wardak, just to the west of Kabul, where they challenge the authority of the Western-backed government.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ