Want the best of VICE News straight to your inbox? Sign up here.

The FBI received a tip in January that someone was posting “hunting guides” online targeting Jews, Muslims, and refugees. Agents traced those guides, which included information like mosque and synagogue addresses, back to a 29-year-old man in Boulder, Colorado.

It wasn’t until late July, after the man, Wesley David Gilreath, left his unlocked iPhone on a bus, that he was arrested and charged with a crime. Public transit workers recovered his lost device and found “thousands of still images of pre-pubescent minor males and females, ranging in apparent ages from infants to pre-teens,” according to the federal complaint.

Last week, the U.S. Attorney’s Office in the District of Colorado announced child pornography charges against Gilreath — and noted that his arrest may have also disrupted a potential domestic terror attack or hate crime.

The case serves as yet another reminder about the limitations of the federal government when it comes to stopping potential domestic terror attacks before they happen. While the FBI has the authority to open up domestic terror investigations, there’s no domestic terror statute to charge a person under, which means the feds have to find alternative ways to arrest someone. The FBI even interviewed Gilreath in January — according to agents, he’d created an audio recording of the interview and labeled it “Wes Gilreath terrorism interrogation.”

“The charge in this case demonstrates that the U.S. Attorney’s Office and our federal and state law enforcement partners will use every available law enforcement tool not just to prosecute federal crimes but also to disrupt and prevent potential hate crimes,” U.S. Attorney Jason Dunn said in a statement.

On Tuesday, federal magistrate judge Scott Varholak ordered that Gilreath remain in detention pending the outcome of the case and described him as a potential flight risk. The judge also said he posed an ongoing danger to the community.

“He had searches for a book that is a guide to gaining children’s trust,” Varholak wrote. “He also had numerous white supremacist documents and paraphernalia.”

Varholak also noted that Gilreath had tried and failed to purchase a gun in May. According to federal documents, he’d filled out ATF form 4473, which is required for all gun purchases. It’s not clear why his purchase didn’t go through, but the form asks potential gun buyers about criminal records, restraining orders, and whether they’ve been committed to a mental institution.

News of Gilreath’s arrest comes as the U.S. is especially on edge, following a string of mass shootings and domestic terror threats. The recent uptick in mass violence has renewed calls from lawmakers and federal law enforcement for the creation of a domestic terror law.

The shortcomings of terrorism laws were also brought to light earlier this year, when federal authorities arrested Christopher Hasson, a U.S. Coast Guard Lieutenant, who they said was planning a large-scale attack in the name of white nationalism and had a hit list of lawmakers and journalists. But Hasson was only charged with gun and drug charges, related to his habit of ordering synthetic opioids from Mexico.