Federal authorities say the FBI has foiled an alleged mass-casualty attack targeting the Mall of America in Minnesota, arresting an 18-year-old suspect after a nearly two-year investigation.

The suspect, identified as Sheikhdoon Abdullahi Mohamud, was arrested October 6 after an undercover FBI employee sold him an inert rifle and ammunition as part of the investigation. Prosecutors allege he intended to carry out an attack at the Bloomington shopping center later this month.

According to the U.S. Department of Justice, Mohamud has been charged with knowingly receiving a firearm and ammunition to commit a federal crime of terrorism. Authorities allege that he had expressed support for ISIS and discussed plans to attack people at the mall.

Federal prosecutors said the alleged plan was disrupted before an attack could take place. The suspect appeared in federal court on October 7 and remains in custody. The criminal complaint contains allegations, and the defendant is presumed innocent unless proven guilty in court.

The case is likely to renew attention on domestic radicalization, federal counterterrorism investigations and security at major public venues across the United States.