A Mexican mayor has been shot dead less than a day after formally taking office, officials said.

Gisela Mota, 33, was attacked by four gunmen at her home in the city of Temixco on Saturday. The attack was confirmed in a tweet by Morelos state governor, Graco Ramirez.

Mr Ramirez tweeted: “I have been informed of an attack on the mayor of Temixco Gisela Mota, young and beloved companion.”

Ms Mota formally took office on Friday, the first day of the new year. Morelos security commissioner Jesus Alberto Capella said the suspects fired on federal police and soldiers from a vehicle.

According to reports, officials say two of the assailants were shot and killed, while the others have been detained.

The motive for the killing is unclear, but reports have attributed it to drug cartels or gangs.

Several mayors were killed by armed gangs last year in Mexico, where cartels seek to control communities and towns.

Ms Mota belonged to the leftist Democratic Revolution Party and had been a federal congresswoman.

Her party released a statement describing her as a “strong and brave woman who on taking office as mayor, declared that her fight against crime would be frontal and direct”.