In addition to the alleged online conversations with the undercover agent, Abu-Rayyan purportedly used Twitter to express solidarity with the terror group.
Abu-Rayyan claimed it would have been "easy" to fire shots on the church, the complaint said. But according to authorities, he said his plan was foiled when Abu-Rayyan's father discovered his gun, ammunition, and a mask he was going to wear before he could carry out the attack.
"Honestly I regret not doing it. If I can't do jihad in the Middle East, I would do my jihad over here," he allegedly said.
He also had armed himself with a knife and told the undercover agent, “It is my dream to behead someone,” authorities said.
Abu-Rayyan does not face any terror charges at this point, and is being held due to gun and drug charges stemming from an October 2015 incident in which he was pulled over for speeding with a pistol, sleeping pills, and marijuana, reported NBC affiliate WDIV. Terror charges could be added later.
Abu-Rayyan is scheduled to appear in court Monday afternoon for a detention hearing.