"I have never understood jihad to mean anti-Americanism or terrorism," Walker Lindh said during his sentencing hearing.
ALEXANDRIA, Virginia (CNN) -- John Walker Lindh was sentenced to 20 years in federal prison Friday after tearfully telling a courtroom that he made a mistake in joining the Taliban.
Walker Lindh, the so-called "Taliban American," told U.S. District Judge T.S. Ellis III that he "made a mistake by joining the Taliban" and "had I realized then what I know now about the Taliban I would never have joined them."
"Life is making choices and living with the consequences," Ellis said. "You made a bad choice to join the Taliban."
Walker Lindh sniffled, paused several times and nearly broke down during his 14-minute statement to the court before he was sentenced to spend two decades behind bars.
Lindh could get out of prison in less than 17 years. The judge gave him credit for the entire time he has been in custody, including the almost two months that he was in military custody, and good behavior could further reduce his sentence by 54 days each year.
Walker Lindh said Osama bin Laden is against Islam.
"His grievances, whatever they may be, cannot be addressed by acts of injustice and violence against innocent people in America," said the 21-year-old Californian. "I never understood jihad to mean anti-Americanism or terrorism."
The father of Johnny Michael Spann, the CIA officer who was killed during an uprising at a prison in which Walker Lindh and others were being held after their capture, also addressed the court, saying the sentence was too short.
"My grandchildren would love to know their dad would be back in 20 years," the elder Spann said. "The punishment doesn't fit the crime to me."
Walker Lindh denied having any role in Spann's death and the judge said he would not have accepted the plea bargain if there were any proof of such a role.
Ellis also noted that Walker Lindh volunteered to join the Taliban fighters, then couldn't leave because he feared for his own life after the United States entered the war in Afghanistan, but he did nothing to warn the United States about future al Qaeda terror attacks planned after September 11.
"You were willing to give your life for the Taliban but not for your country," he said.
Walker Lindh's attorney, James Brosnahan, said the country should not be focusing on his client in the war against terror.
"It's time for the American government, and I include the attorney general, Mr. Ashcroft, to get out and get some real terrorists," Brosnahan said outside the courtroom. "John is not a terrorist, he's a certified, court approved, non-terrorist."
But the government counts his capture and sentence a victory.
This photo of John Walker Lindh was distributed in February by the Alexandria County, Virginia, Sheriff's Department.
"Just one year ago today, John Walker Lindh was a soldier in the Taliban army, assigned to the front lines in the Taliban's war against the Northern Alliance," said U.S. Attorney Paul McNulty. "John Walker Lindh chose to fight with the Taliban knowing that the Taliban provided protection and support to al Qaeda, a terrorist network. Today's sentence proves that the American criminal justice system is a powerful and effective tool in America's struggle against terrorism."
Walker Lindh met Thursday with his parents, brother and sister at the jail where he has been held. He was the first American taken prisoner in Afghanistan as a Taliban fighter.
Walker Lindh was returned to the United States last January.
Last July, Walker Lindh changed his plea to guilty to one count of supplying services to the Taliban and a criminal charge that he carried a rifle and two hand grenades while fighting on the Taliban's front lines in Afghanistan against the Northern Alliance.
If he had gone to trial and was found guilty of the government's original indictment, Walker Lindh could have spent the rest of his life behind bars.
In return for the guilty plea, the government dropped all but one count of a lengthy criminal indictment including one of the most serious charges -- conspiracy to kill U.S. nationals.
Prosecutors said Walker Lindh has cooperated with the government since pleading guilty. Under the terms of plea agreement, neither he nor any member of his family can accept money for selling his story.
"The defendant hereby assigns to the United States any profits or proceeds which he may be entitled to receive in connection with any publication or dissemination of information relating to illegal conduct alleged in the indictment, " states the agreement.