NEW YORK - In the same Brooklyn courthouse where jurors have heard testimony about Mexican politicians protecting Joaquin “El Chapo” Guzman’s drug empire, a former Mexican state attorney general pleaded guilty last month to taking bribes from narcotraffickers.

The juxtaposition underscored a recurring theme of Guzman’s New York trial: how pervasive official corruption in Mexico complicates American authorities’ efforts to investigate and apprehend those involved in the drug trade.

Jurors are expected to begin deliberating Monday after 11 weeks of testimony that included a parade of Guzman’s former associates who told of massive bribes paid to high-level officials.

One testified that the Sinaloa cartel paid $10 million, twice, to a top commander in the Mexican Federal Police. Another said Mexico’s former federal security chief got a $6 million payoff while a general got $100,000. Witnesses testified about Guzman getting a police escort after a prison escape and politicians who asked for help shipping 100 tons of cocaine in an oil tanker. In the most sensational claim, one of Guzman’s former aides said he’d heard him boast about having paid former Mexican President Enrique Pena Nieto $100 million.

“The corruption has been rampant, and it’s systemic,” said Arturo Fontes, a former FBI agent who spent years investigating Guzman’s drug syndicate. “We always knew there was a risk of information getting to the wrong people.”

The accused Mexican leaders have all denied the bribery allegations as the fabrications of criminals. And the corruption allegations have been mostly a sideshow in the trial of Guzman, who is charged with leading a cartel that smuggled tons of cocaine to the U.S. His lawyers have said he was not the real boss and that its true head is still at large in Mexico, protected by a web of bribes.

But colorful testimony about graft provided a window into the challenges U.S. law enforcement agents face when working with Mexican partners — and the great lengths they went to in the Guzman case to ensure it wasn’t compromised.

Underscoring the risks of sharing information with Mexican law enforcement, several months ago, a former Mexican intelligence-unit commander was sentenced to three years in a U.S. federal prison for leaking American investigative secrets to cartel bosses. Last month, Edgar Veytia, the former attorney general of the Mexican coastal state of Nayarit who is known as “Diablo,” admitted to using his badge to help drug-trafficking organizations smuggling narcotics into the U.S., according to the Justice Department.

Mike Vigil, who was a U.S. Drug Enforcement Administration agent for many years, said not even Mexico’s military or federal police will work with authorities at the state and municipal level due to their “cancerous” propensity for being on the take.

“They are squarely in the pockets of the drug cartels, to the point that they engage in the smuggling and transportation of drugs and the killing of cartel enemies,” Vigil told The Associated Press, referring to local police forces. “If you can’t work with them it, it makes it really hard to carry out some of the missions.”

But during the trial, jurors heard testimony about one successful partnership between U.S. and Mexican authorities: the operation that led to Guzman’s capture in 2014 after he escaped from a Mexican prison for the second time.

DEA operations are restricted in foreign countries, but the agency trains “vetted units” of Mexican federal police officers to conduct American-led operations. Members of the units are subjected to polygraph exams and required to pass background checks and urinalysis tests. The DEA taps these officers to conduct surveillance and interdict drug shipments, among other tasks.

DEA agent Victor Vazquez told jurors he would only work with the Mexican marines when trying to capture Guzman and other leaders of the Sinaloa cartel because that wing of the armed forces is viewed as less susceptible to corruption.

He testified that the marines operated from a base outside Mexico’s Sinaloa region because the assumption was that everyone there, including police, were eyes for the cartel.

“You’re driving around in a lion’s den, and you really can’t trust anybody,” Vazquez said.

After a first near-miss, where Guzman escaped by fleeing through a tunnel, Mexican marines finally captured him at a hotel in Miramar.

Supporters of Pena Nieto have pointed to the capture as proof that he was hunting Guzman, not protecting him. Pena Nieto’s former chief of staff, Francisco Guzman, said in a Twitter message that the bribery allegation, made by a Colombian former aide to Guzman, was “false, defamatory and absurd.”

Guzman’s lawyers have also denied that he paid off Pena Nieto but nevertheless have called the Mexican government “crooked.”

During the trial, U.S. prosecutors sought to limit testimony about the alleged bribes to Mexican officials, citing the potential to harm relations between the two countries and also foreign governments’ willingness to extradite defendants to the U.S.

Mexico got a new president while the trial was under way who has vowed to make battling corruption a central part of his administration.

President Andres Manuel Lopez Obrador has proposed creating a 50,000-member national guard, initially composed of members of the military and federal police, that would fight the drug cartels in the place of local police forces deemed too corrupt to be trusted.

Loading... Loading... Loading... Loading... Loading... Loading...

Lopez Obrador has said he isn’t interested in punishing past governments for corruption but has promised zero tolerance for corruption at all levels of government going forward.

While corruption is widespread, Jeronimo Cortina, associate director of the Center for Mexican American Studies at the University of Houston, said testimony from drug traffickers should be taken “with a grain of salt.”

If Guzman really paid a $100 million bribe, Cortina said, “it was a bad business decision considering he was nevertheless extradited to the United States.”