Halfway through 2014, three Arizona men were falling under the sway of the Islamic State group, authorities say.

The trio watched videos depicting violence by jihadists, tried to get pipe bombs, planned an attack at a Prophet Muhammad cartoon contest in Texas last year and researched travel to the Middle East so they could join Islamic State fighters, investigators say.

Two of the men brought semiautomatic rifles and an Islamic State flag to the May 3 contest featuring cartoons deemed offensive to Muslims and died in a shootout with police before hurting anyone attending the event in suburban Dallas.

The third man goes on trial Tuesday in Phoenix in what is believed to be the first time the U.S. government has put a person on trial on terror charges related to the militant group.

Abdul Malik Abdul Kareem, a 44-year-old moving company owner, is accused of hosting the two gunmen at his home to discuss plans for the attack, going target shooting in the remote Arizona desert with the pair and providing the guns used at the contest.