Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

PHOENIX — A man was sentenced to 30 years in prison Wednesday on charges that he provided support to the ISIS group by helping two followers with an attempted attack on an anti-Islam event in Texas that resulted in a deadly shootout with police.

Prosecutors were seeking a 50-year sentence for Abdul Malik Abdul Kareem, an American-born Muslim convert who became the second person in the U.S. to be convicted of charges of supporting ISIS. He was convicted of conspiring to support a foreign terrorist organization, interstate transportation of firearms and other charges.

His friends, Elton Simpson and Nadir Soofi, were the only ones killed in a May 2015 police shootout outside a Prophet Muhammad contest in Garland, Texas. A security guard was wounded, but no one else was injured. The contest featured cartoons that are offensive to Muslims.

Authorities have said Kareem watched videos depicting violence by jihadists with the two friends, encouraged them to launch violent attack to support the terrorist group and researched travel to the Middle East to join ISIS fighters.

"He knew what Mr. Simpson and Soofi intended to do," said U.S. District Judge Susan Bolton.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Kareem kept his head down as the sentence was announced. "I had nothing to do with this crime," Kareem told the judge.

Abdul Malik Abdul Kareem is charged with planning an attack on a Prophet Muhammad cartoon contest in suburban Dallas. Maricopa County Sheriff's Department via AP, file

Bruce Joiner, the security guard who was shot in the leg during the attack, told the judge that the shooting has caused him anxiety. He said Kareem made people fearful and disagrees with the American notion of freedom of religion.

But Joiner, who invoked his Christian faith, said he believes Kareem still has worth as a person. "I offer my forgiveness," Joiner said.

Kareem's attorney, Daniel Maynard, acknowledged that his client associated with people who had radical political views, but underscored that his client was in Arizona at the time of the attack.

Prosecutor Kristen Brook said Kareem played an active role in assisting in an attempted mass murder. "The offense was ideologically fueled hatred," Brook said

She said Kareem had expressed his desire to strap a bomb on his body to kill nonbelievers. Brook also said he celebrated the 2015 attack on the French satirical magazine Charlie Hebdo in what extremists claim is retaliation for the publication of cartoons about the Prophet Muhammad.

Authorities also said Kareem inquired about explosives to blow up the Arizona stadium where the 2015 Super Bowl was held but later set his sights on the cartoon contest after that plan fell through.

Kareem testified that he didn't know his friends were going to attack the contest and didn't find out about the shooting until after Simpson and Soofi were killed.

Kareem told jurors at his trial last year that he strongly disapproved of Simpson using Kareem's laptop to watch al-Qaida promotional materials.

An undercover FBI agent who had previous social-media contacts with Simpson was outside the convention center and close to the car driven by Simpson and Soofi in the moments before the shooting erupted, according to court records. The agent is alive but it's unclear what happened with the agent after the shooting.

Prosecutors had originally sought a life sentence, but late last week told Bolton that they instead were asking for a 50-year sentence.