A Mexican town’s entire police force was reportedly arrested following the murder of a left-wing mayoral candidate.

About 30 Ocampo officers were detained and questioned about the murder of Fernando Angeles Juarez, according to El Universal. The officers were arrested after a previous attempt to question them resulted in one official reportedly being “chased out in a hail of bullets.”

Ocampo, located about 95 miles west of Mexico City, has been plagued by illegal logging and gangs. The town’s police force is one of many accused of being involved in corruption as Mexico attempts to fight back against the drug cartels.

Alejandro Hope, a Mexican security analyst, said that the escalating violence can be explained by “simple mathematics”: There are far more elections being held simultaneously than ever before in Mexico. With more than 3,400 local, state and federal posts at stake, there are more than 15,000 candidates hitting the campaign trail.

“Secondly, this speaks to the changes in criminal groups,” Hope said. “With the evolution of crime, it becomes much more important to gain control over territory, over local governments.”

At least 18 candidates have been killed while running for some type of political post across Mexico, almost all of them running for a local position.

The July 1 elections will decide the presidency, governorships and Congress. The killings have mostly taken place in the Mexican states of Michoacan, Guerrero and Oaxaca.

The Associated Press contributed to this report.