BOSTON (AP) — A man convicted of leading an Islamic State-inspired plot to behead a conservative blogger who upset Muslims when she organized a Prophet Muhammad cartoon contest was sentenced on Tuesday to 28 years in prison.

David Wright sobbed as he apologized to blogger Pamela Geller, law enforcement and his family and denounced the terror group, whose horrific acts he used to celebrate online.

“Nothing I can say can fix the hurt I caused,” the 28-year-old Wright said. “I sincerely hope that I can be given the opportunity to help others avoid the mistakes I made.”

Wright was convicted in October of conspiracy to provide material support to the Islamic State group, conspiracy to commit acts of terrorism transcending national boundaries and other crimes.

Prosecutors had sought a life sentence for Wright, arguing it would send a strong message to others considering terror attacks in the U.S. But Judge William G. Young said he was uncomfortable with sending Wright away for life, telling him: “You are not a monster, yet you embraced a monstrous evil.”

Prosecutors portrayed Wright, who’s from Everett, just north of Boston, as the ringleader of the conspiracy to kill Geller, who has spearheaded scores of events across the nation to decry Islamic extremism. The cartoon contest Geller organized in Garland, Texas, in 2015 ended in gunfire, with two Muslim gunmen shot to death by police.

The plot to behead Geller, of New York, was never carried out. Instead, Wright’s uncle Usaamah Rahim told Wright on a recorded phone call that he decided to go after “those boys in blue,” referring to police. Wright told his uncle that was “beautiful” and encouraged him to delete all the data from his computer before carrying out his attack.

Hours later, Rahim was fatally shot by authorities after he lunged at them with a knife when they approached him in Boston.

Geller, who spoke at Wright’s sentencing, urged the judge to sentence him to life and said it was “impossible to overstate the devastation” he had brought to her life. Geller said she had been forced to live in fear and spend tens of thousands of dollars on security.

“There is no assurance that anyone can give me that he would not resume his quest to kill me and my relatives,” she said.

Wright’s attorneys had asked for a 16-year sentence, saying he should be given the chance to redeem himself after serving his time. Wright insisted he never really wanted to hurt anyone but pretended to support the Islamic State group to get attention online.

Prosecutors said Wright collected dozens of gruesome Islamic State videos and documents that encouraged violence against Americans, including a manifesto that said America’s days are “numbered.” In court documents, they accused him of trying to “deceive” the court into believing that he never meant any harm.

“His actions gravely threatened the lives of innocent Americans,” Assistant U.S. Attorney Stephanie Siegmann said.

Wright, who weighed more than 500 pounds when he was arrested, testified during the trial that he started sharing Islamic State propaganda because he was desperate for attention and an escape. But he said the plan to kill Geller was just “trash talk” and claimed he never believed his uncle was serious about attacking police.

The third man charged, Nicholas Rovinski, of Warwick, Rhode Island, pleaded guilty last year to conspiracy, testified against Wright and is scheduled to be sentenced on Wednesday. Prosecutors and Rovinski’s defense attorney have asked the judge to sentence him to 15 years in prison.

(© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)