Mexican officials on Friday (local time) admitted they had bungled the arrest of jailed kingpin Joaquin "El Chapo" Guzman's son, who they let go amidst shootouts with drug gangs in the streets of a major city, but the president insisted his security strategy was working.
Cartel gunmen surrounded security forces in the northwestern city of Culiacan on Thursday and made them free Ovidio Guzman, one of the drug lord's dozen children, after his brief capture set off widespread gun battles and a jailbreak that stunned the country.
The chaos in Culiacan, a bastion of Guzman's Sinaloa Cartel, raised pressure on President Andres Manuel Lopez Obrador, who took office in December promising to pacify a country weary of more than a decade of gang violence.
Mr Lopez Obrador has come under heavy criticism on social media and among security experts, who said that authorities risked encouraging copycat actions by caving in to the gang, and that retreat from a major city created the impression that the cartel, not the state, was in control.
His own officials said the operation had not been planned as well as it should have been.
"It was done hastily, the consequences were not considered, the riskiest part wasn't taken into account," Defense Minister Luis Cresencio Sandoval told a news conference in Culiacan, alongside Security Minister Alfonso Durazo, who called the attempt to capture the younger Guzman a "failure."
Mr Durazo admitted he and the military top brass were not aware ahead of time of the attempt to capture the alleged trafficker, calling it a bureaucratic error.
But the president, a veteran leftist who has advocated a less confrontational approach to tackling the gangs, defended the government response.
"Capturing a criminal can't be worth more than people's lives," he said, adding that officials "did well" to free Ovidio Guzman.
"We don't want dead people, we don't want war," Mr Lopez Obrador said.
"We're doing really well in our strategy," he said.
The violent reaction to Guzman's detention was on a scale rarely seen during Mexico's long drug war, even after his more famous father's arrests.
Mr Sandoval said he had reports of at least eight people killed, including five suspected gang members, in Culiacan, a city of nearly a million people in Sinaloa state.
One Facebook user on Friday stumbled on two dead bodies in the street near an abandoned truck, suggesting the death toll may yet rise.
Footage of Thursday's chaos on social media showed panicked residents fleeing and high calibre gunfire ringing out.
People cowered in shopping centres and supermarkets and black plumes of smoke rose across the skyline.
Chaos continued into the night after a large group of inmates also escaped from the city prison.
On Friday, cars navigated burnt-out vehicles that partially blocked streets and schools remained closed.
Gladys McCormick, a security analyst at Syracuse University in the United States, said the latest news from Mexico read like that of a country in "the throes of war."
"What is incontrovertible is that the Sinaloa Cartel won yesterday's battle," she added.
"Not only did they get the government to release Ovidio, they demonstrated to the citizens of Culiacan as well as the rest of Mexico who is in control."
Mr Lopez Obrador rejected the suggestion the government had acted weakly in releasing the younger Guzman, describing this view as "conjecture" put about by his adversaries to hurt him.
A trenchant critic of past administrations, Mr Lopez Obrador said previous government strategies had turned Mexico into a "graveyard" and that his critics wanted him to continue with it.
He argues that authorities should focus more on the root causes of drug violence, such as poverty and a lack of jobs.
At the same time, he has created a new National Guard, but thousands of that militarised police force's members have instead been sent to contain illegal immigration through Mexico at the behest of US President Donald Trump.
He has also sought to underline his command of law and order by chairing security cabinet meetings every weekday at 6am.
Still, the murder tally in Mexico this year is on track to surpass last year's record total of more than 29,000.
Thursday's events followed the massacre of more than a dozen police in western Mexico earlier this week, and the killing of 14 suspected gangsters by the army a day later.
Mr Lopez Obrador said security forces had swooped on the house in Culiacan to capture Ovidio Guzman after a judge issued a warrant for his arrest and extradition.
That contradicted the initial version put out on Thursday by the government, which was that the officers had come under fire from the house while passing, then found Guzman inside.
The elder Guzman escaped from prison in Mexico twice, in 2001 and 2015. Under the previous administration, security forces captured him two times in Sinaloa, in 2014 and 2016.
The previous government extradited him to the United States on the eve of Mr Trump's accession. He was found guilty in a US court in February of smuggling tons of drugs and sentenced to life in prison.
The US Department of Justice unveiled an indictment against Ovidio and one of his brothers in February, charging them with conspiracy to distribute cocaine, methamphetamine, and marijuana in the United States.