More from CBS Detroit:
Court files say that conversations online with undercover agents revealed that 21-year-old Khalil Abu-Rayyan of Dearborn Heights was planning to open fire at an unnamed Detroit church.
According to the documents, Abu-Rayyan was under federal surveillance starting in May 2015. It was found that Abu-Rayyan was posting and retweeting ISIS-supporting posts on Twitter, along with photos of him firing an AK-47 and an AR-25 at a gun range.
Abu-Rayyan allegedly told an undercover agent through social media about his plans for an attack.
"I tried to shoot up a church one day," Abu-Rayyan posted, the complaint said. "It's one of the biggest ones in Detroit. I had it planned out. I bought a bunch of bullets. I practiced reloading and unloading. But my dad searched my car one day and he found everything. He found the gun and the bullets and a mask I was going to wear.: