A Somali-American man has been sentenced to 30 years in prison for plotting to bomb a Christmas-tree lighting ceremony in the western U.S. state of Oregon nearly four years ago.

Mohamed Osman Mohamud was arrested in November 2010, after pressing a keypad button on a cellphone that he believed would trigger a truck bomb parked near a holiday event in Portland. But the bomb was a fake provided by FBI agents posing as al-Qaida recruiters.

Somali-American Gets 30 Years for Christmas Bomb Plot

Mohamud, a naturalized U.S. citizen, was a student at Oregon State University student when undercover agents befriended him after learning that he had exchanged emails with terrorists and published articles for an online jihadi magazine.

Somali-American Gets 30 Years for Christmas Bomb Plot

Mohamud's defense team said he will appeal the sentence.

Somali-American Gets 30 Years for Christmas Bomb Plot

Mohamud apologized in court before the sentencing. He acknowledged "the things I said and did were terrible."