Last week, Coleman Thomas Blevins logged on to an online forum to confess a menacing plan, police said: The 28-year-old from Kerrville, Tex., was going to storm into a Walmart and shoot up the place.

But an undercover police officer intercepted the message. After consulting the FBI, law enforcement swiftly labeled Blevins a national security threat.

On Friday, the Kerr County Sheriff’s Office arrested Blevins and charged him with making a terroristic threat — thwarting a possibly deadly scenario, police said. Officials said they later found weapons and racist and extremist materials in his home.

“Our investigators did outstanding work in this case, and possibly saved many lives,” Sheriff Larry Leitha said in a news release on Sunday. “The plot interrupted in this case is unthinkable.”

The arrest comes amid a spate of mass shootings across the country. On Mother’s Day, a gunman in Colorado Springs killed six people at a birthday party and then turned the gun on himself. In mid-April, a 19-year-old fatally shot eight people at a FedEx plant in Indianapolis. Other mass shootings in Atlanta and Boulder have left those cities reeling.

The attack on a King Soopers grocery store in Boulder, Colo., is the latest in a state that has been disproportionately plagued by the gun violence epidemic. (Luis Velarde/The Washington Post)

Texas has previously been the scene of a deadly attack at a Walmart. In 2019, a 21-year-old gunman brandishing an assault-style rifle stormed into an El Paso Walmart and killed 22 people, law enforcement said, in what authorities called a hate crime and domestic terrorism. In the weeks before the incident that rocked the border town, the shooter wrote a manifesto using language borrowed from extremist groups, authorities said.

Blevins was previously convicted of a felony and was out on probation, police said. It is unclear what the crime was or how long he has been on probation, but one condition of his release was that he was forbidden from owning weapons, Leitha said.

Police began monitoring Blevins in an online forum, which isn’t named in court documents, earlier last week. Undercover officers worked to gain a rapport with Blevins in the forum, according to the sheriff’s office.

“Through the period of investigation, KCSO investigators made contact and conversed with Mr. Blevins, confirmed his affiliation and networking with extremist ideologies,” the sheriff’s office said.

Then on Thursday, the sheriff’s office, with the help of the Texas Department of Public Safety’s criminal investigations division, intercepted a message from Blevins indicating he was preparing to pursue a “mass casualty event” and “made a specific threat that included Walmart,” the sheriff’s office said.

Investigators with the county’s special operations division called the FBI, which confirmed that Blevins was serious about the threat.

With the assistance of the FBI, Kerrville Police Department and the Secret Service, the sheriff’s office arrested Blevins on Friday in Kerrville, a town of more than 23,700 people about 70 miles northwest of San Antonio. Blevins was booked in Kerr County Jail on $250,000 bond. Jail records do not indicate if he has a lawyer. He could also faces federal charges from the FBI or other federal agencies, the sheriff’s office said. It is unclear when Blevins is due in court.

Following the arrest, police searched Blevins’s home, where they found an assault weapon, ammunition, handwritten notes, drugs and “racial ideology paraphernalia,” police said.

Officers also found several flags, including a Confederate flag, a Saudi Arabian flag and one with a swastika and a sonnenrad, a Norse symbol that was appropriated by the Nazis. There was also a Falangist flag, which once represented the extreme nationalist group during Spain’s civil war in 1936.

Law enforcement also found several books tied to extremism, including “The Turner Diaries,” a right-wing novel that is said to have inspired dozens of terrorist attacks and hate crimes, including the Oklahoma City bombing in 1995, and “Revolt Against the Modern World” by Julius Evola, a far-right Italian writer and philosopher who wrote about fascism in the 1920s and ’30s and who is often referenced by domestic extremists. There was also a T-shirt with the symbol for the National Partisan Movement, an online group meant to groom the next generation of far-right members.

“This case reminds us that we need to always be vigilant,” Leitha, the sheriff, said in the release. “Many think ‘that can’t happen here,’ and it was well on the way to happening.”