PITTSBURGH — A western Pennsylvania man whom authorities called a "homegrown, radical extremist" was sentenced Tuesday to 8 ½ years in prison for helping lead an Internet forum that promoted terrorist attacks against American military and civilian targets.

The sentence for Emerson Begolly, 24, formerly of Redbank Township, also includes time for having a concealed gun and biting an FBI agent when he was arrested in 2011.

Begolly apologized for his posts and disavowed his stated beliefs, telling the judge his comments were "completely reckless. No good would have come from making such comments."

"All I want to do is pursue a path of peace and righteousness," Begolly continued. "I feel I've learned my lesson and I feel I don't want to make jail a revolving door for myself."

Begolly's online rants were primarily meant to attract attention and kudos from others on the forum, public defender Marketa Sims had argued, though she and Begolly acknowledged others might have been incited to violence nonetheless.

His online persona, "Abu Nancy," referred to a fantasy female friend. Begolly got involved in the Web forum less because of the ideas espoused than because he received praise there, Sims argued.

But Assistant U.S Attorney Jimmy Kitchen said Begolly's willingness to kill or be killed was summed up in a post: "If I have the choice between 12 jurors and six pallbearers, I'll choose the latter any day."

And when agents tried to arrest him as he sat in his mother's car in the parking lot of a fast-food restaurant, Begolly bit them and reached for a 9mm pistol hidden in a military field jacket.

Sims said the agents spooked Begolly into reacting violently when they sneaked up on him in the car, but Kitchen said Begolly's posts — including instructions to shoot the heads or legs of "pigs" as he referred to law enforcement to avoid their bulletproof vests — proved he hoped to cause greater harm.

"I'll make Waco look like a tea party," Kitchen quoted Begolly as referring to the armed showdown between federal agents and messianic cult leader David Koresh in 1993.

"This case dramatizes the threat of the homegrown, radical extremist," said U.S. Attorney David Hickton.

All parties agree Begolly is a socially inept, outcast who has struggled with autism and mental health issues since he was a young child. He can't drive a car, never learned to ride a bike and never had a girlfriend.

Begolly's sentence was far less than the 15-year term he agreed to when he pleaded guilty nearly two years ago, and which prosecutors still sought in a sentencing memorandum filed last week. He will receive credit for 30 months he's spent in jail since his arrest, and so will be free in about six years.

Begolly spent an unexplained hour in chambers with Senior U.S. District Judge Maurice Cohill Jr. before the sentencing.

Hickton would not explain why prosecutors agreed to a lesser sentence or whether it was because Begolly has cooperated against others the FBI said he chatted with on the forum, including convicted terrorists Colleen LaRose and Zachary Chesser.

"I can't be specific about what cooperation he may have given," Hickton said.

In previous hearings, FBI agents testified that Begolly chatted online with Chesser and LaRose, a suburban Philadelphia woman who dubbed herself "Jihad Jane."

LaRose pleaded guilty in 2011 to conspiring with others to try to kill a Swedish cartoonist who had offended Muslims and faces life in prison when she's sentenced in October.

Chesser, of Bristow, Va., is serving 25 years in prison after pleading guilty to threatening the creators of the irreverent "South Park" cartoon series for perceived insults to the prophet Muhammad, and for trying to travel to Somalia to join the al-Shabab terrorist group.

Begolly, like Chesser, was indicted by a federal grand jury in Virginia on charges he used the online forum to encourage terrorist attacks on public buildings and military facilities, transportation systems, cellphone towers, water plants, synagogues, Jewish schools and other targets in the United States.

The charges were announced months after the FBI arrested Begolly in western Pennsylvania. Begolly was living with his father in Mayport, about 60 miles northeast of Pittsburgh.