An Albanian national who talked about joining ISIS and attacking random people to avenge the Christchurch shooting in New Zealand was arrested at a gun range in Montana, authorities said Thursday.

Fabjan Alameti, 21, appeared before a US magistrate judge Thursday on charges of possession of a firearm by an unlawful user of a controlled substance and making false statements involving international and domestic terrorism. Judge Jeremiah Lynch ordered him detained for further proceedings.

Alameti was first noticed making pro-ISIS comments on Facebook in 2018, FBI Special Agent Matthew Duermeier said in a sworn statement filed with the court. Starting in January of this year, Alameti spoke with a federal informant about fighting with the terrorist organization in Iraq and Syria and plotting an attack in the U.S. against a military facility, recruitment center, government building, “gay club” or Jewish temple, Duermeier said. But Alameti also later said he would not carry out an attack on U.S. soil because the country had granted him citizenship, the FBI agent’s statement said.

Alameti told the informant he moved from his home in the Bronx to Bozeman, Montana last month because he hated his life in New York City, he was having family issues and he had a job interview in Montana, where it was also easier to buy a gun, Duermeier said. He asked the federal informant to send him a link to the video of the shooting in the Christchurch mosques because it would fuel him. “I will attack random people to avenge the blood,” Alameti told the informant, according to Duermeier.