ALEXANDRIA, Va. (AP) — John Walker Lindh, the young Californian who became known as the American Taliban after he was captured by U.S. forces in the invasion of Afghanistan in late 2001, is set to go free after nearly two decades in prison.

But conditions imposed recently on Lindh’s release, slated for Thursday, make clear that authorities remain concerned about the threat he could pose once free.

Lindh, now 38, converted to Islam as a teenager after seeing the film “Malcolm X” and went overseas to study Arabic and the Quran. In November 2000, he went to Pakistan and from there made his way to Afghanistan. He joined the Taliban and was with them on Sept. 11, 2001, when al-Qaida terrorists attacked the World Trade Center and the Pentagon.

Lindh received a 20-year prison sentence. He served roughly 17 years and five months, including two months when he was in military detention. Federal inmates who exhibit good behavior typically serve 85 percent of their sentence.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.