VERACRUZ, Mexico — Six police officers died on Sunday from smoke inhalation after prisoners started a fire while resisting an effort to transfer dangerous inmates out of a prison in Mexico’s Gulf Coast state of Veracruz, the authorities said.

Gov. Miguel Ángel Yunes of Veracruz said a seventh person had died, but it was unclear whether that person was an inmate or a prison guard.

Mr. Yunes said four “highly dangerous” inmates had been helping run criminal networks in the area around La Toma prison in the town of Amatlán de los Reyes, so officials had decided to transfer them to a maximum-security federal prison.