MEXICO CITY – Think before you tweet.

A former teacher turned radio commentator and a math tutor who lives with his mother sit in a prison in southern Mexico, facing possible 30-year sentences for terrorism and sabotage in what may be the most serious charges ever brought against anyone using a Twitter social network account.

Prosecutors say the defendants helped cause a chaos of car crashes and panic as parents in the Gulf Coast city of Veracruz rushed to save their children because of false reports that gunmen were attacking schools.

Gerardo Buganza, interior secretary for Veracruz state, compared the panic to that caused by Orson Welles’ 1938 radio broadcast of “The War of the Worlds.” But he said the fear roused by that account of a Martian invasion of New Jersey “was small compared to what happened here.”

“Here, there were 26 car accidents, or people left their cars in the middle of the streets to run and pick up their children, because they thought these things were occurring at their kids’ schools,” Buganza told local reporters.

The charges say the messages caused such panic that emergency numbers “totally collapsed because people were terrified,” damaging service for real emergencies.

Veracruz and the suburb of Boca del Rio were already on edge after weeks of gunbattles involving drug traffickers.

On Aug. 25, Gilberto Martinez Vera, who works as a tutor at several private schools, allegedly sent repeated messages that gunmen were taking children from schools. In fact, no such kidnappings occurred that day.

In a subsequent tweet about the kidnap rumor, he said: “I don’t know what time it happened, but it’s true.” He also tweeted that three days earlier, “they mowed down six kids between 13 and 15 in the Hidalgo neighborhood.”