An ex-Georgia sheriff’s deputy who was arrested for gun charges has pleaded guilty.

During the probe, authorities also discovered text messages where he made “racially motivated extreme statements,” prosecutors said in a statement on Wednesday. The FBI came upon the former deputy, Cody Richard Griggers when it was investigating a violent extremist group.

On Monday, the 28-year-old pleaded guilty to one count of possession of an unregistered firearm. He faces up to 10 years in prison, with his sentence hearing slated for July. He was fired last November when he was implicated in the FBI’s investigation, after having only worked as a deputy in Wilkinson County for just over a year, according to the Belleville News-Democrat

In text messages to a purported extremist group chat, Griggers bragged about a violent arrest that involved a Black man and charging Black people with felonies to stop them from voting. He also allegedly said he was producing and accumulating illegal firearms and explosives.

“I beat the (expletive) out of a (racial slur) Saturday. (Expletive) tried to steal (a gun magazine) from the local gun store. … Sheriff’s dept. said it looked like he fell,” the FBI affidavit said, quoting Griggers’ text messages. He also described the beating as “sweet stress relief.”

Elsewhere, he wrote that he “intended to charge black people with felonies in order to keep them from voting.” He continued, “It’s a sign of beautiful things to come,” adding that he’s “going to charge them with whatever felonies I can to take away their ability to vote.”

Last November, the FBI came upon a machine gun “with an obliterated serial number” in Griggers’ patrol car. “An unregistered short barrel shotgun was found in his home,” the statement said. “In all, between the defendant’s residence and duty vehicle, officers found 11 illegal firearms.”

Wilkinson Sheriff Richard Chatman said that when Griggers was fired, he said he was “sorry all this happened, that that wasn’t really him.”