"One theory could be that it was a warning to the other mayors," Castro said to reporters. "If you don't cooperate with organized crime, look at what will happen to you. It's to scare them."
Temixco, with about 100,000 people, is a suburb of Cuernavaca, a city famed among tourists for its colonial center, gardens and jacaranda-decked streets. "The city of eternal spring" was long a favorite weekend getaway for people from nearby Mexico City.
But drug and extortion gangs have plagued the area in recent years, driving away some tourists and residents. The expressway — and drug routes — between Mexico City and the country's murder capital of Acapulco cuts through Cuernavaca and Temixco.
Temixco also saw one of Mexico's emblematic killings of the past decade: The 24-year-old son of poet Javier Sicilia and six other people were found slain in March 2011, prompting the writer to start a nationwide movement against violence.
Prosecutors said the seven apparently had gotten into an argument with men who turned out to be local members of the Pacifico Sur drug cartel.
Efforts to clean out corrupt local police who have protected gangs led Morelos to put officers under a unified state command in 2014. Temixco joined that system, though the state's main city, Cuernavaca, has resisted.
One organization representing mayors in the country, the Association of Local Authorities of Mexico, issued a statement saying nearly 100 mayors have been killed across Mexico over the past decade, "principally at the hands of organized crime."