Notorious “American Taliban” John Walker Lindh — who abandoned his country to train with Osama bin Laden — has been released from an Indiana prison.

The 38-year-old from Northern California served 17 years of a 20-year sentence and was released early for good behavior, CNN reported.

His lawyer, Bill Cummings, told the network that he plans to live in Virginia under the close eye of his probation officer.

As part of his three-year probation, Lindh can’t obtain a passport or travel abroad. He has to seek permission in order to obtain a computer and the device must be monitored by authorities.

Lindh became a lightning rod following his capture in Afghanistan in November 2001 — when he went by the name Abdul Hamid. He was photographed at the time looking wide-eyed and dazed, with a dirty face and bushy beard.

The son of a middle-class couple from north of San Francisco, Lindh was raised Catholic but converted to Islam at age 16. In 1998, he traveled to Yemen to study Arabic and then to Pakistan to study Islam.

Lindh enlisted in the Taliban in mid-2001 and was among hundreds of Islamic insurgents captured that November amid America’s post-9/11 war on terror.

The then-20-year-old revealed his true identity to two CIA officers, one of whom, Johnny Spann, was killed in a prisoner revolt hours after he interrogated Lindh.

Lindh had no role in Spann’s death — America’s first Afghanistan war combat casualty — but became forever politically entwined in it.

After being hauled back home to face terrorism and conspiracy charges, Lindh copped a plea deal in 2002 and pleaded guilty to reduced charges of illegally aiding the Taliban and carrying weapons and explosives in commission of that crime.

The agreement spared him the potential of multiple life sentences.

At his sentencing, Lindh admitted to volunteering as a Taliban soldier to help fellow Muslims in their jihad but said he had no intention “to fight against America.”

He said then he condemned “terrorism on every level” — but hasn’t made comments since.

His impending release from prison has drawn criticism from lawmakers and families of 9/11 victims.

In a letter to the Federal Bureau of Prisons this week, two senators accused Lindh of still “openly” supporting extremist violence.

“We must consider the security and safety implications for our citizens and communities who will receive individuals like John Walker Lindh,” they said.

Secretary of State Mike Pompeo called Lindh’s release “unexplainable and unconscionable.”

“There is something deeply troubling and wrong about it,” Pompeo said Thursday morning on Fox News.

Leaked US government documents published by Foreign Policy magazine show the feds, as recently as 2016, described Lindh as holding “extremist views.”

With Post wires