MEXICO CITY — Mexico's former defense minister had a secret life in which he used the army to help a cartel send heroin, cocaine and other drugs to the United States, according to American court documents released Friday.

Some called him the Godfather.

Retired Gen. Salvador Cienfuegos, 72, was detained Thursday at the Los Angeles International Airport. Prosecutors in New York unsealed a four-count indictment Friday charging him with drug- and money-laundering crimes. He appeared in a federal court in Los Angeles via video later Friday, but a hearing on his detention was delayed until Tuesday. His attorney, Duane Lyons, did not immediately respond to requests for comment.

Cienfuegos’s arrest has raised the startling possibility that top Mexican security officials have quietly been working with traffickers during most of the U.S.-backed offensive against the cartels that began in 2006.

The public-security minister in the first six years of that effort, Genaro García Luna, is awaiting trial in New York. He has pleaded not guilty to charges of accepting bribes to help the Sinaloa Cartel.

Cienfuegos served as defense minister in the next administration, that of President Enrique Peña Nieto, from 2012 to 2018. He is accused of working with a group known as H-2, an offshoot of the Beltrán Leyva Cartel. It operated mainly in the western states of Sinaloa and Nayarit.

The court documents lay out a devastating picture of a senior official who, prosecutors say, used his power to help a drug cartel at every turn. Cienfuegos ensured that the Mexican military did not carry out operations against H-2 but instead focused on its rivals, the documents say. He is accused of finding ships for the cartel’s drugs. Cienfuegos even tipped off H-2 about the fact that it was under investigation by U.S. law enforcement, according to the documents.

Using that knowledge, H-2 killed one of its own members, a person who senior cartel leadership “incorrectly believed” was assisting U.S. officials, according to the allegations.

The former minister’s actions were detailed in thousands of BlackBerry messages he sent and were corroborated by witness accounts, the documents say. He did not immediately enter a plea. He faces a mandatory minimum sentence of 10 years on drug conspiracy charges if found guilty.

Mexico’s governments have increasingly turned to the armed forces to take on criminal organizations because of persistent corruption in the police. Cienfuegos’s detention was a bombshell in Mexico, where the military is one of the most trusted institutions.

“We are facing an unprecedented situation,” President Andrés Manuel López Obrador told his daily news conference Friday, referring to the detentions of the two former ministers. “This is an undeniable sign of the decomposition of the regime.”

Since 2007, the U.S. government has provided Mexico with about $3 billion in security and justice aid through the Merida Initiative. Yet the country remains the No. 1 source of heroin and methamphetamines reaching the United States and a major corridor for cocaine and fentanyl.

The Trump administration recently warned that unless it shows progress, “Mexico will be at serious risk of being found to have failed” to meet its international drug-control commitments. It called for more efforts to dismantle drug organizations and crack down on fentanyl production.

Corruption in Mexico’s armed forces has typically been construed as an issue of individuals, rather than the institutions, said Adam Isacson, a security analyst at the Washington Office on Latin America. But the arrest of Cienfuegos seems to point to a web of corruption that “goes all the way up” to the top of the military, he said.

U.S. and Mexican security experts said Cienfuegos was generally regarded as an honest professional. The arrest “really does come as a shock for those who knew and worked with him,” said Roderic Camp, a professor emeritus at Claremont McKenna College who has written two books on Mexico’s military.

The defense chief even received an award from the Pentagon’s Center for Hemispheric Defense Studies in 2018, the year he retired.

Cienfuegos was a different person in private, according to the depiction of him by prosecutors.

He was known as “El Padrino” — the Godfather — according to the documents. He received bribes and helped recruit other Mexican officials to be put on H-2’s payroll, according to the records. He talked about having previously worked for a different drug-trafficking group, according to the documents, which did not elaborate.

The minister oversaw the army and air force. U.S. anti-drug agencies have worked regularly with those forces but carried out many of their most sensitive operations with the navy, part of a separate ministry. Mexico’s marines had been embroiled in a years-long war with H-2.

The documents say Cienfuegos helped the cartel from December 2015 to February 2017. That month, the leader of H-2, Juan Francisco Patrón Sanchez, was gunned down by Mexican marines.

The two military branches “may have been acting at cross-purposes, with the former quietly supporting a guy that the navy was at war with,” Isacson said.

López Obrador has criticized the military-led “war on drugs,” which is widely associated with a soaring number of homicides in recent years. Nonetheless, he has called on the armed forces for an increasing number of tasks, including building an airport and distributing medical supplies.

The president said that anyone implicated in Cienfuegos’s case who is serving in the government would be suspended, retired or investigated. “We are not going to cover up for anyone,” he said.

López Obrador declined to speculate on the guilt of Cienfuegos, noting that he had not seen the evidence. He instead lauded his handpicked military leaders for their integrity.

“Most of those who are part of these institutions are honest Mexicans,” he said.

López Obrador said his government heard of the U.S. probe only two weeks ago, from his ambassador in Washington, Martha Bárcena.

Analysts said the arrest had undoubtedly created unease in the military. Numerous senior officials were promoted by Cienfuegos. And his case could lead to other detentions. “To do these crimes, you need the participation of other people,” said Ricardo Márquez Blas, a former Mexican security official.

Still, many people in Mexico’s military and government circles remained skeptical of the accusations against Cienfuegos, and some said his arrest could threaten to erode cooperation between the two countries.

Raul Benitez-Manaut, a professor at the National Autonomous University of Mexico who specializes in national security, said the first instinct of military officers and their allies will be to blame the U.S. government and cast doubt on the allegations.

“Inside the military, you have some talking about how we cannot trust the U.S. because we cooperated with them in this fight against drugs and crime and now they are accusing our leaders,” Benitez-Manaut said.

There was no immediate reaction to Cienfuegos’s arrest by former president Peña Nieto. Felipe Calderón, who was president from 2006 to 2012, said he had no idea García Luna might have been involved in organized crime.

Jacobs reported from New York. Missy Ryan in Washington contributed to this report.