MEXICO CITY — President Andrés Manuel López Obrador of Mexico on Friday defended the country’s security forces for capturing — and then releasing — a son of the infamous drug lord El Chapo.

He said their actions had saved innocent civilians after a cartel unleashed mayhem in a Mexican city where the son had been seized.

Mr. López Obrador spoke a day after well-armed cartel gunmen paralyzed the northwestern city of Culiacán, spraying automatic gunfire in broad daylight in response to the arrest of Ovidio Guzmán López, one of the children of El Chapo, whose real name is Joaquín Guzmán Loera. The son was later released by the outgunned soldiers.

“Decisions were made that I support, that I endorse because the situation turned very bad and lots of citizens were at risk, lots of people and it was decided to protect the life of the people,” Mr. López Obrador said. “You cannot value the life of a delinquent more than the lives of the people.”