National media reported that police shot dead 27-year-old Brandon Arellano, the son of a local teacher, as he arrived outside his grandmother's house. Videos shared online show his father attempting to revive him at the scene.

"Once he had parked, they opened fire against the car and killed him instantly, shooting him in the jugular like cowards," father Delfino Arellano said on video. "My son died instantly."

Authorities did not disclose why Arellano had been stopped.

Residents of Lerdo de Tejada, a town in the Gulf coast state of Veracruz, overturned a police car and set it on fire and clashed with police officers at the scene. They also broke windows at the local government palace and set it on fire.

A social media post from the state's public security ministry shortly after the killing said four municipal police officers had been detained for suspected homicide and would make their statements to state prosecutors.

"There will be no impunity," the ministry said.

(Reporting by Tamara Corro in Veracruz and Raul Cortes in Mexico City; Writing by Sarah Morland; Editing by Chizu Nomiyama)