A white supremacist who pleaded guilty to a terrorism charge for his armed takeover of an Amtrak train last year was sentenced to 14 years in federal prison on Friday.

Taylor Michael Wilson, 26, from the St. Louis region, said he “dropped acid” right before he took a gun into a secure area of an Amtrak train passing through a remote part of Nebraska, bringing the train to a halt. Wilson, who had a National Socialist Movement I.D. card on him, said shortly after the attack that he was “going to save the train from black people.”

Wilson had attended the 2017 “Unite the Right” rally in Charlottesville, Virginia. Authorities said they found a secret compartment behind his refrigerator stocked with a handmade shield he used in Charlottesville, a tactical vest, more than 1,000 rounds of ammunition, and “white supremacy documents and paperwork.”

U.S. District Judge John Gerrard in Nebraska called Wilson a “gun-toting, angry, at times incoherent and other times uncooperative white supremacist” before sentencing him to to the prison term, according to the Lincoln Journal Star.

“You now have a choice to make,” Gerrard told Wilson, according to reporter Lori Pilger. “You can either renounce the white supremacist nonsense that you’ve been fed and go back to the way you were raised as a young man. Or you can coddle up to plenty of other white nationalists that you will find incarcerated.”

He added: “I hope that you will make the right choices. You’re certainly going to have time to think about it.”

Wilson told the judge that his actions were “stupid and immature,” but not terrorism.

“My actions that day had nothing to do with the ideologies I bought into. I never had the intention of hurting anyone. I did not have any hate or ill-will toward anyone on the train,” Wilson said, according to Pilger.

Because the United States lacks a federal statute that explicitly makes domestic terrorism a crime, it is relatively rare for the government to charge non-Muslims under terrorism laws. The reason the terrorism statute applied to Wilson’s crime was not that he was motivated by a particular ideology, but because attacks on trains are explicitly outlawed and labeled as terrorism.