“If you are not prepared to use force to defend civilization, then be prepared to accept barbarism,” a member of the Red-State Secession group on Facebook posted on Tuesday, the eve of the appointed day, Jan. 6.

Beneath it, dozens of people posted comments that included photographs of the weaponry — including assault rifles — that they said they planned to bring to the rally. There were also comments referring to “occupying” the Capitol and forcing Congress to overturn the November election that Joseph R. Biden Jr. had won — and Mr. Trump had lost.

Renée DiResta, a researcher who studies online movements at the Stanford Internet Observatory, said that the violent disruption at the Capitol on Wednesday was the result of online movements operating in closed social media networks where claims of voter fraud and a stolen election found oxygen.

“This is a demonstration of the very real-world impact of echo chambers,” Ms. DiResta said.