A former state attorney general from Mexico pleaded guilty on Friday to U.S. drug-trafficking charges at a courthouse where an infamous kingpin was also appearing at a conspiracy trial.

Both Edgar Veytia, once chief law enforcement officer in the Pacific coast state of Nayarit, and Joaquin "El Chapo" Guzman are being prosecuted in separate cases in federal court in Brooklyn.

Shortly after Guzman's ongoing trial wrapped up for the week, Veytia was brought into another courtroom to plead guilty to charges he was bought off to help cartels smuggle cocaine, heroin and methamphetamine to the U.S. from 2013 until the time of his arrest in 2017.

The 48-year-old Veytia admitted that he arranged for drug dealers to avoid arrest and or to be released from custody. He didn't specify which organizations he supported, but it's not believed that Guzman's Sinaloa cartel was one of them.

"I used my official position . to assist drug-trafficking organizations," he told the judge.

Veytia faces at least 10 years in prison at sentencing later this year, though the term could be more than double that if the judge follows sentencing guidelines as calculated by prosecutors. According to an indictment, the goverment could also seize "a sum of approximately $250 million in United States currency" under forfeiture laws.

According to press reports, Veytia survived a 2011 assassination attempt and promoted himself as a law-and-order candidate when he ran for attorney general.

"Nayarit is not fertile ground for lawbreaking," he once said. "Here, there is no room for organized crime."

The case fit a pattern of allegations of brazen corruption on display at Guzman's trial. Jurors have heard testimony from cooperators claiming multiple instances of various law enforcement officials taking bribes from the Sinaloa cartel to look the other way or demanding a piece of drug profits in the 1990s and 2000s.

Former cartel member Jesus Zambada has testified that he personally made at least $6 million in hidden payments to the former federal security chief, Genaro Garcia Luna. He said the cash was delivered during two meetings at a restaurant in Mexico between the start of 2005 and the end of 2007, an allegation denied by Luna.

Earlier this week, Zambada's nephew Vicente described a meeting in the mid-2000s in which representatives from corrupt Mexican politicians asked if the cartel could help them ship 100 tons (91 metric tons) of cocaine in an oil tanker ship. He said he was arrested before he learned whether the shipment ever occurred.