ALEXANDRIA, Va. — A Muslim convert from Brooklyn was sentenced Friday to nearly 12 years in prison for posting online threats against the creators of the “South Park” television show and others he deemed enemies of Islam.

The sentence — largely in line with the term sought by prosecutors — came after Jesse Curtis Morton, 33, offered an apology for his conduct, saying he “contributed to a clash of civilizations” by espousing a violent ideology.

“I justified atrocities by Muslims simply because they were carried out by the weak against the powerful,” Morton said.

Morton founded the now-defunct Revolution Muslim website. He said he wanted the site to offer a forum for nuanced dialogue on relations between the Muslim world and the West and that he thought his website was protected by the First Amendment. However, he admitted that the website devolved into coarse calls for violent jihad, and that he crossed the line by posting the al-Qaida magazine Inspire on the site. The magazine explicitly called for the murder of a cartoonist from Seattle who promoted “Everybody Draw Muhammad day” and featured an article titled “How to Make a Bomb in the Kitchen of Your Mom.”

He and another defendant, Zachary Chesser, used the website to deliver thinly veiled threats against the creators of the “South Park” television show for perceived insults to the prophet Muhammad, by depicting him in a bear costume. Chesser earlier received a 25-year sentence, but he also tried to travel to Somalia to join the al-Shabab terrorist group.

Prosecutor Gordon Kromberg said Morton’s apology may well be sincere, but argued that a stiff sentence was necessary because of the nature of the crime. He said Morton’s site inspired a variety of would-be jihadis, including “Jihad Jane” Colleen LaRose; Antonio Benjamin Martinez, who plotted to bomb a military recruiting station; and Jose Pimental, who plotted to assassinate members of the U.S. military returning from Afghanistan and Iraq. He also corresponded with American al-Qaida member Samir Khan on writing an article for use as al-Qaida propaganda.

Kromberg said the posting of Al-Qaida’s instructional article on how to build a kitchen bomb will inevitably lead to someone’s death in the future. And he said Morton abused his free speech protections to call for the murder of those whose speech he found offensive.

“Make a TV show we don’t like — we’ll slit your throat. Draw a cartoon we don’t like — we’ll slit your throat,” Kromberg said, summarizing Morton’s philosophy.

U.S. District Judge Liam O’Grady said Morton was a bright man who could have used his intellect and energy for good but instead took a “horrible turn.”

“You were rubbing elbows with some of the most dangerous revolutionaries of the past few years,” O’Grady said, who told Morton “there has to be religious tolerance in the world. There has to be freedom of speech.”

Defense attorney James Hundley had sought a prison term of less than five years. He argued that Morton by and large tried to keep his website on the right side of the line between free speech and advocating violence, but admitted that at times Morton crossed it.

“His goal was to engage in dialogue,” Hundley said.

Morton’s prosecution was relatively novel under a law enacted in recent years that makes it a federal crime to use the Internet to place another person in fear of death or serious injury.

Morton was arrested last year in Morocco, where he moved after Chesser’s arrest.