Mexican President Andres Manuel Lopez Obrador faced a firestorm of criticism on Friday as his security forces acknowledged that they arrested kingpin Joaquin “El Chapo” Guzman’s son, then released him when his cartel responded with an all-out gun battle.

Admitting his troops carried out a “badly planned” operation, Defence Minister Luis Sandoval said they briefly arrested Ovidio “El Raton” Guzman – one of several sons running the Sinaloa drug cartel since their father was extradited to the US in 2017 – but released him after being overpowered.

“It was a badly planned strategy,” Sandoval told a news conference in Culiacan, the western city of 750,000 people that was turned into an urban war zone on Thursday.

“The task force acted too hastily,” he added, saying soldiers “improvised” by trying to obtain an arrest warrant midway through.

He said the authorities never “formally detained” Guzman, 28, one of at least nine children “El Chapo” fathered with three wives.

The six hours of clashes left one civilian and seven soldiers dead, and three police wounded, officials said after an emergency cabinet meeting in Culiacan, the state capital of Sinaloa, the Guzmans’ bastion.

Heavily armed cartel gunmen surrounded the house where Guzman was being held on Thursday afternoon and launched a massive machine-gun assault on various parts of the city, sending terrified residents fleeing for safety and leaving the streets strewn with blazing vehicles.

Lopez Obrador defended the decision to free Guzman.

“I support the decisions that were made. The situation turned very difficult and many citizens’ lives were at risk,” Lopez Obrador told a separate news conference.

“You can’t fight fire with fire,” he said adding that Mexico was acting on a 2018 US request for Guzman’s extradition.

But the incident turned what was already a difficult week on the security front – with two other gun battles that killed 28 people – into a total nightmare for the leftist leader.

“This is a disaster any way you look at it,” tweeted security analyst Alejandro Hope.

“What happened yesterday is that the drug cartels are more powerful than the Mexican government. They can bring it to its knees. That’s not good,” anti-narcotics expert Mike Vigil, former head of international operations for the US Drug Enforcement Administration, said.

In Congress, members of the conservative National Action Party called on Lopez Obrador and his security cabinet to step down.

“Resign!” they chanted on the floor of the lower house.

Security Minister Alfonso Durazo denied officials had negotiated Guzman’s release with his cartel.

The government also faced criticism for its murky communications.

Durazo initially said the gun battle erupted when soldiers on a routine patrol happened upon Guzman.

Lopez Obrador, however, called it a planned operation carried out with an arrest warrant. Sandoval said there was no warrant.

The government, which initially released only hazy details, took around 18 hours to admit publicly that it had captured and released Guzman.

“El Chapo”, 62, was sentenced to life in prison last July in New York for trafficking hundreds of tonnes of cocaine, heroin, methamphetamine and marijuana into the US over the course of a quarter-century.

However, his cartel remains one of the most powerful in Mexico.

The Guzman brothers have tried to fill their father’s shoes, but anti-narcotics experts portray them as flashy party boys who have little ability to run the business side of the cartel.