Zachary Adam Chesser, an Oakton High School graduate and former basketball and football player, wore a green jumpsuit with the word "Prisoner" written in white across the back as he stood before a federal judge in Alexandria to hear his sentence on terror-related charges.

U.S. District Judge Liam O'Grady sentenced Chesser to 25 years in prison for trying to join an al-Qaeda-linked terrorist group in Somalia and making threats to the creators of TV's "South Park" show over their depiction of the prophet Muhammad.

In October, Chesser, of Oakton, pleaded guilty in U.S. District Court to charges of providing material support to terrorists, communicating threats and soliciting crimes of violence. Prosecutors had asked for the maximum 30 years in prison. As part of his plea, Chesser agreed to request no less than 20 years.

During an hour-long hearing Thursday, Chesser, 21, who wore a beard with his longish brown hair, told the judge that he was remorseful. "Your honor, I accept full responsibility," he said as his parents sat nearby.

He apologized to his 1-year-old son and his "brothers and sisters in the Muslim community." When he gets out of prison, he said, "my ambitions are to provide for my family and my child and to lead a quiet life."

Defense attorney Michael Nachmanoff said that his client was only a teenager when he committed the offenses and that Chesser has since "renounced violence and violent jihad." In a pre-sentencing letter to the judge, Chesser wrote that he was ashamed of his actions and that he hoped to make up for them.

But O'Grady said Chesser was an "extraordinarily energized traitor to your country."

He told Chesser: "It's amazing how quickly you became a danger. If anyone had been harmed, we'd be talking about a life sentence."

The sentencing is part of the story of a suburban Washington man whom friends described as "freakishly intelligent" and who became known to the FBI as a prolific Internet propagandist for al-Qaeda.

He was arrested in July, just days after he was prevented from traveling with his infant son from New York's John F. Kennedy International Airport to Uganda. From Uganda, he was headed to Somalia, and he planned to join al-Shabab, an Islamic terrorist group trying to oust Somalia's government.

Chesser also admitted to making threats over the Internet to "South Park" creators Trey Parker and Matt Stone, saying that they would "wind up like Theo van Gogh." The reference was to a Dutch filmmaker gunned down in 2004 after he assailed the treatment of women in Islamic society.

Assistant U.S. Attorney Gordon D. Kromberg, who prosecuted the case, told the judge that Chesser was known online as "a jihadi." U.S. Attorney Neil H. MacBride called the 25-year sentence "significant" and cited Chesser's "egregious criminal conduct."

How Chesser changed is something he and his family still seem to be grappling with, according to letters in the court filings that were written by his father, stepmother and Chesser himself.

As a child, Chesser's interests drifted. At one time, he listened to heavy metal music, studied Japanese and Buddhism and joined a largely ethnic Korean break-dancing team.

In a Feb. 11 letter to the court, Chesser's father, David, an economist and contractor for the U.S. Transportation Department, described him as an "intellectual, athletic and artistic" person who was also "impulsive, impractical, naive and obstinately single-minded."

In 2008, Chesser became a Muslim and, as a student at George Mason University, isolated himself from anyone who did not practice Islam. Chesser grew a beard, donned a traditional robe and later married the daughter of a Ugandan diplomat who had been raised as a Roman Catholic but converted to Islam. The two married three days after they met through a local mosque. In November 2009, the couple had a son.

From his small apartment in Northern Virginia, Chesser - who became known online as "Abu Talhah" - spent hours on the computer, posting on radical Islamic Web sites, forums and blogs.

In a Dec. 10 letter to the court in which he takes responsibility for his actions, Chesser describes himself as someone who felt like he had to "do everything to the fullest extent, whether it was how I dressed, who I spoke to, or how I prayed." He goes on to say that after "about three months of being a practicing Muslim," he was given a copy of lectures by the U.S.-born Yemeni cleric Anwar al-Aulaqi.

The cleric has been linked to 2009's massacre at Fort Hood, Tex., and an attempt to blow up a Detroit-bound plane on Christmas Day. Chesser said in his letter to the court that the "element of radicalism" in the lectures "served as a gateway for me to other more extreme beliefs." According to the FBI, Chesser exchanged e-mails with Aulaqi.

But Chesser said he has had a change of heart. In the Dec. 10 letter, he wrote that the "jihadi ideology" he was drawn into "was contrary to everything I had grown up thinking and believing."

He reconciled his beliefs, he wrote, "by convincing myself that if I went to fight jihad, I would be saving more lives even if it meant that others died. I understand now how preposterous that sounds, and I completely reject the idea that killing can be justified in the name of Islam or any religion."

He wrote that he was "ashamed and bewildered" by the allegations and described his roughly 18 months of following a radical version of Islam as "a missing puzzle piece in my life."

"I know that I will spend many years trying to understand why I followed the path that has led me here," he wrote. "I only hope that through my actions now and in the future I can make up for what I have done."