Oaxaca state prosecutor Manuel de Jesus Lopez says authorities are still investigating possible motives in the killings, which occurred when Mayor Luis Jimenez Mata was visiting the state capital.
His largely Indian town of Santiago Amoltepec has been locked in a decade-long land dispute with a neighboring town that has resulted in about a dozen deaths.
Over a dozen mayors were killed in 2010. Mexico has 2,440 mayors. Many of the slayings were allegedly linked to organized crime, but there was no immediate evidence in the Oaxaca case.
Most of the killings have occurred in northern Mexico.