Three men who reportedly have ties to a neo-Nazi group and had allegedly discussed attacking a Virginia gun rally next week were arrested and charged with breaking federal gun and immigration laws on Thursday.

Of those arrested, one of the detained was Patrik Mathews, a former reservist in the Canadian Army who U.S. officials say entered the country illegally after Canada kicked him out of the service over his suspected ties to white supremacist groups, ABC News reported.

The CBC reported that while in the force, Mathews worked as a combat engineer and had basic explosives training while serving with the Winnipeg-based 38 Canadian Brigade.

The other two arrested were American citizens — Brian Mark Lemley and William Garfield Bilbrough IV — but what the three of them had in common is that they all had suspected ties to the white supremacist group The Base, according to a federal criminal complaint filed in Maryland District Court.

Prosecutors say Mathews entered the U.S. illegally in August 2019 and was sheltered by Lemley and Bilbrough while they lived in Maryland until they moved to Delaware in November that same year.

“Within The Base’s encrypted chat rooms, members have discussed, among other things, recruitment, creating a white ethno-state, committing acts of violence against minority communities, the organization’s military-style training camps, and ways to make improvised explosive devices,” the complaint stated.

The FBI arrested the three men under suspicion that they were planning to travel to the rally to begin “a possible race war,” the New York Times reported.

The three men are expected to make their first court appearance Thursday afternoon in Maryland.