Twenty-one-year-old Khalil Abu-Rayyan of Dearborn Heights, Michigan planned to attack a Detroit church with 6,000 members on behalf of the Islamic State, according to a federal criminal complaint.

Abu-Rayyan is not currently facing terrorism charges, but was instead appearing in federal court Thursday on gun and marijuana charges, having been found with pot and a pistol when he was pulled over for speeding by Detroit police on October 7.

The FBI revealed it has been investigating him since May of 2015 “regarding increasingly violent threats he has made to others about committing acts of terror and martydom – including brutal acts against police officers, churchgoers and others – on behalf of the foreign terrorist organization Islamic State of Iraqi and Levant.”

The Detroit Free Press reports that federal agents have been monitoring Abu-Rayyan’s phone conversations and social media, including two Twitter accounts where he expressed support for ISIS and posted its propaganda, including “videos of a Jordanian pilot burned alive, Christians being beheaded, and men being thrown from buildings in executions.”

In a series of online conversations with an undercover FBI operative, Abu-Rayyan “repeatedly expressed his desire to commit a martyrdom operation.”

He had a few specific ideas for how he might “martyr” himself for the glory of ISIS. He talked about wanting to kill the officer who arrested him for speeding by shooting up the hospital where the policeman was recuperating from a heart attack.

He also talked about planning a gun massacre at a 6,000-member church, one of the “biggest ones in Detroit.” He said he had purchased sufficient ammunition and was ready to strike, but his jihad plan was scuttled when his father searched his car and found his gun, bullets, and the mask he planned to use. He was also worried about having to constantly reload his six-shot pistol during a mass shooting spree. (However, the Detroit News reports that in other social media postings, Abu-Rayyan claimed to own an AK-47 with a 40-round magazine, similar to the type of weapon favored by ISIS militants in Iraq and Syria.)

The FBI complaint noted that a church fitting the description of Abu-Rayyan’s intended target is located only half a mile from where he works.

He told the FBI why he thought the church would make a good target: “It’s easy and a lot of people go there. Plus people are not allowed to carry guns in church. Plus, it would make the news. Everyone would’ve heard.”

“Honestly, I regret not doing it,” Abu-Rayyan added. “If I can’t do jihad in the Middle East, I would do my jihad over here.”

Other details from the federal complaint include Abu-Rayyan’s “dream to behead someone,” for which purpose he wanted to keep swords and large knives handy; his tendency to become “excited” when he heard about killings; a Twitter profile photo that shows him standing in his driveway and flashing the ISIS one-finger victory salute; and a photo of himself posing with a rifle captioned “Sahwat hunting,” which means he was fantasizing about shooting Iraqi tribesmen who oppose the Islamic State.

Abu-Rayyan has a detention hearing scheduled for Monday afternoon, and has been assigned a federal defender, according to The Detroit News.