Three police officers were killed and 10 other people were wounded around 3:30am Sunday when a group of armed civilians attacked police in downtown Zamora, Michoacán.
In the initial confrontation, three officers were wounded, two of whom later died.
Other officers who arrived at the scene to aid their colleagues were also targets of gunmen.
The shooters were driving pickup trucks marked with the initials of the Jalisco New Generation Cartel (CJNG).
Later in the morning, the armed group attacked police cars in another Zamora neighborhood, during which another officer was killed and seven others were wounded.
Two civilians who were passing through the area were also hurt.
Federal forces are helping to ensure security in the area, while Michoacán state police have opened an investigation into the events.
Shortly before the attacks, a video circulated on social networks showing a convoy of at least 20 cars and pickup trucks bearing the initials of the CJNG. In the video, the man who is recording video orders armed men, dressed in black, to board the vehicles, and shouts encouragement to them.