A Mexican judge has ordered on Wednesday for Sinaloa cartel's founder and leader Hector "El Guero" Palma to be held for 40 more days in non-prison custody pending investigation. 

The attorney general's office said the judge had granted an order to hold El Guero Palma at a prosecutor's detention facility while being probed on drug and organized crime charges, Associated Press reported.

El Guero Palma was a founder and leader of the Sinaloa cartel, maneuvering the drug cartel's operation with now-imprisoned Joaquin "El Chapo" Guzman.

El Guero Palma was arrested in Mexico in 1995 and had served 12 years in Mexico on bribery and weapons charges before he was extradited to the U.S. in 2007.

The Sinaloa cartel founder served nine years of a 16-year sentence in the U.S. for cocaine trafficking before being sent back to Mexico, where his trial on the charges he was acquitted of last week was held.

Around eight years ago, another drug lord walked out of a Mexican prison late at night with an improperly ordered released.

The drug lord was Rafael Caro Quintero, who has since then returned to drug trafficking and engaged in bloody turf battles in the northern Mexico border state of Sonora.

READ NEXT: Mexican President Defends Release of Infamous Drug Kingpin Targeted by U.S.

Mexican Drug Lords Released

President Andres Manuel Lopez Obrador earlier said that the Sinaloa cartel founder's release could affect Mexico's reputation.

Lopez Obrador admitted that he overrode the initial advice of his own advisers, who told him there was nothing more the government could do to keep El Guero Palma in custody. 

Under Lopez Obrador's presidency, the Mexican government is starting to earn a reputation of releasing more drug lords than it has captured, Star Tribune reported.

"When they told me (about the release order), the first thing I said is wait, look for some legal mechanism," López Obrador said of the Saturday conversation. 

He quoted his aides saying, "No, nothing can be done, it is an order by a judge, we can't disobey the order." Lopez Obrador then replied to "look for" a solution since this is a matter of national interest and not just a matter of a judge, judicial branch, or government. 

He said "imagine the suspicion, the jokes, the memes" if the Sinaloa cartel leader was released. He noted that the Mexican government could not be denigrated or weakened.

The Mexican president said that something similar had happened when Caro Quintero was released. Lopez Obrador noted that the Mexican government had been accused from abroad of being complicit.

"No foreign government should accuse the Mexican government, and we shouldn't give them a pretext to do that," he said. 

Caro Quintero was at the top of the Drug Enforcement Administration's (DEA) most-wanted list. He has a $20 million bounty for his capture. He was freed while serving a 40-year sentence for the murder of DEA agent Enrique "Kiki" Camarena in 1985.

It can be recalled that Lopez Obrador ordered the release of Ovidio Guzman in 2019 to avoid bloodshed. Guzman was one of El Chapo's son. 

Lopez Obrador has said that his "hugs not bullets" policy is meant to curb violence, ABC News Go reported. However, murder rates had only declined slightly from their peak in 2019.

READ MORE: A Four-Part Docuseries About Enrique "Kiki" Camarena's Short Life

WATCH: El Guero Palma: Tragic Life Story of a Narco - From WorthTheHype