The son of drug kingpin “El Chapo” was released after a shootout erupted between Mexican authorities and Sinaloa cartel forces, leaving at least two dozen casualties.

The gunfight erupted in the city of Culiacán in Mexico’s western state of Sinaloa. Mexican security secretary Alfonso Durazo said army and National Guard troops were on patrol when they stumbled upon a house in which Ovidio Guzmán López was hidden.

López Guzman is the son of notorious drug kingpin Joaquin “El Chapo” Guzman, who is currently jailed in the United States, and is wanted in the U.S. for drug trafficking.

Troops stormed the house and took the younger Guzman into custody when they were surrounded by heavily armed forces. The group opened fired on security forces, forcing them to retreat into the house. This sparked a shootout that forced civilians to flee as cartel and security forces traded gunfire in the streets.

Bystanders managed to capture videos of the chaos.

Durazo said given the size of the force outside, authorities decided to release López to avoid further violence.

“With the goal of safeguarding the well-being and tranquility of Culiacán society, officials in the security Cabinet decided to suspend the actions,” Durazo said, according to NPR.

After Guzman was released, cartel gunmen reportedly continued firing randomly as they drove through the streets. Bodies and damaged vehicles were left in the wake.

Cristobal Castañeda, Sinaloa state's head of security, told the Televisa network two people were killed and 21 injured. Pictures of the scene indicated the death toll would rise.

Mexican President Andres Manuel Lopez Obrador defended the troops actions Friday morning, saying they saved lives by releasing Guzman.

“The officials who took this decision did well,” Obrador said, according to Reuters. “We’re doing really well in our strategy.”

Gunmen take position in Culiacan, Mexico, where security forces arrested one son of jailed drug kingpin Joaquin "El Chapo" Guzman Gunmen take position in Culiacan, Mexico, where security forces arrested one son of jailed drug kingpin Joaquin "El Chapo" Guzman Photo: AFP / STR