Heavy fighting broke in northern Mexico after the security forces seized one of the sons of jailed drug kingpin Joaquín “El Chapo” Guzmán.
Fighting raged for several hours after Ovidio Guzmán López was found during a routine patrol in the city of Culiacán.
Footage on Mexican TV showed armed men with heavy weapons firing on police, with vehicles, bodies and burning barricades strewn across the street.
Mr Guzmán was later released – to avoid further violence, the authorities said.
Mexico’s security minister, Alfonso Durazo, said a patrol of National Guard militarised police came under heavy fire from within the house where Mr Guzmán was being held, forcing them to retreat for their own safety.
Mr Guzmán was arrested but later released, “to avoid more violence in the area and preserve the lives of our personnel and recover calm in the city”, Mr Durazo said.
Mexico’s President Andrés Manuel López Obrador said he would hold a meeting of his security cabinet to discuss the incident.
Mr Obrador was elected on a platform of cracking down on Mexico’s drug cartels, and has tasked a new security force, the National Guard, with fighting them.
Under El Chapo’s leadership, the Sinaloa cartel was the biggest supplier of drugs to the US, officials say.
With El Chapo now behind bars, the cartel is said to be partially controlled by Ovidio Guzmán, who is accused of drug trafficking in the US.
The state government said Ovidio Guzmán was found in a house by a police patrol on a routine search.
It said cartel members subsequently launched the huge attack in an attempt to seize him back from the authorities.
Armed men were seen in several areas of Culiacán on Thursday
Ovidio Guzmán, said to be in his 20s, is believed to have played a key role in the Sinaloa cartel, following the arrest of his father.
He is wanted in the US on several drug-related charges, Mexican media report.
The battle to free Ovidio Guzmán from police broke out near the state prosecutor’s office, with fighting then spreading to several other parts of the city.
There have been no official reports of fatalities, but pictures have emerged apparently showing dead bodies on the streets.
Some police officers were wounded, the Sinaloa state government told Reuters news agency, without elaborating on how many or their condition.
Cars and jeeps have been set on fire during the clashes in Culiacán
As fighting brought the city to a standstill, the Sinaloa state government said an unknown number of inmates had escaped from the Aguaruto prison.
The state government said it was “working to restore calm and order in the face of the high-impact incidents that have occurred in recent hours in various points around Culiacán”, AFP news agency reports.
It called on residents to “remain calm, stay off the streets and be very attentive to official advisories on the evolving situation”.