The Founders Library on the campus of Howard University in the District. (Doug Kapustin for The Washington Post)

The threats were posted nearly two years ago, on the online message boards 4chan and Reddit, targeting students at the District’s historically black Howard University.

“Any n-----s left at Howard University after 10 tomorrow will be the first to go . . . After all, it’s not murder if they’re black.”

On Wednesday, 26-year-old John Edgar Rust, who is white, was arrested and charged in Alexandria federal court with making that threat from a Panera Bread restaurant in Northern Virginia.

D.C. police and campus police stepped up their patrols at Howard University for two days after the 2015 threat, prosecutors said, and the school contacted the FBI. As evidence that the messages were taken seriously, in an affidavit, FBI agent Keith Palli points to tweets from Howard students discussing their fear of going out on school grounds that night.

Rust is a felon barred from using the Internet. He is a registered sex offender, according to state records, convicted in 2012 in Loudoun County of aggravated sexual battery and indecent liberties with a child by a custodian.

John Edgar Rust (VIRGINIA STATE POLICE)

FBI agents traced the Nov. 11, 2015, threat to the wireless Internet at the Panera on Richmond Highway in Alexandria. A MacBook Air and Nokia phone registered to Rust were both connected to that network, and his credit card had been used at the restaurant.

Rust admitted early on that he was on his computer at Panera that day, and eventually that he had violated his probation by accessing the Internet, Palli said.

When agents searched his computer, they said they found that he had visited both 4chan and Reddit about the time that the threat was posted. The text of the threatening post was allegedly found on his computer, along with various draft versions.

The message referenced protests at the University of Missouri over the handling of racial issues that led the school president to resign. According to the FBI, searches for stories about the Missouri protests were found on Rust’s computer, as was a tweet from a Howard student about supporting those protests.

Research on explosives, firearms and poison were also allegedly found on Rust’s laptop. His phone was used to search for articles reacting to his own threats, according to the FBI.

“Anarchy on the Internet works,” he allegedly told an associate in a text message.

“I’m angry at everyone and that’s just fueling the existing unresolved anger I have towards people which will burst,” he told the same person, according to the affidavit. “I planned how to take out that anger years ago and I’ve been sitting on that plan ever since.”

Rust faces a maximum of five years in prison if convicted. He appeared in court for the first time Wednesday and does not yet have an attorney, according to online filings.