As a top-ranking Mexican police official, Ivan Reyes Arzate was a right-hand man for U.S. Drug Enforcement Agency officials in Mexico. They shared intelligence, and asked Reyes to help them with surveillance missions against Mexico’s top cartels.

But what they didn’t realize, until it was too late, was that Reyes was one of many cops on the drug lords’ payroll, according to a complaint filed in federal court. All the mission information they gave him was supposedly quickly funneled, over BBM, to the very subjects of their investigations, and Reyes’s betrayal allegedly even got one informant tortured and killed.

Reyes was accused of leaking that information and more in a federal criminal complaint unsealed in Illinois this week, where he is charged with conspiracy to corruptly obstruct, influence, and impede an official proceeding. He is accused of helping the El Chapo-linked Beltran Leyva cartel, among others, though his alleged treachery carries a sentence of just five years in prison.

Reyes was the highest-ranking member of one of the Mexican federal police’s Sensitive Investigation Units, according to the complaint. The SIUs were authorized by Congress 20 years ago, and meant to screen, identify, and train foreign personnel to work alongside the DEA, according to the Justice Department website. They operate in countries across the world, but the hallmark of the program is the extensive screening process that members go through.

"[T]he vetting of an SIU member should include at a minimum a background check, a urinalysis test, and a polygraph examination. Applicants must pass these three tests before they can become part of an SIU,” it reads. “Additionally, SIU members must submit to and pass periodic urinalysis tests and polygraph examinations throughout their tenure as an SIU participant." Reyes, for instance, allegedly told one of the U.S. government’s confidential informants that he’d been trained at a government facility in Virginia.

Yet even these safeguards sometimes fall short. Some “senior level [Mexican federal police] supervisory personnel have been exempted from the polygraph screening,” according to the complaint.

And it may have meant a grisly end for one of the government’s informants, and a leak within the Mexican police for more than half a decade.

At a 2009 meeting in Cuernavaca, Mexico, Reyes, two police buddies, and a coterie of drug lords met to discuss why the traffickers’ cocaine was getting seized, according to the complaint. Arturo Beltran Leyva, one of the world’s most notorious drug kingpins who would die later that year, supposedly suspected a mole.

One of the police officials then pulled out a photograph of a U.S. government informant and some American documents. Reyes and his cronies discussed that individual’s work on behalf of the U.S. with cartel leaders, according to the complaint.

“Specifically, according to [a confidential source], Reyes explained that [the informant] had been arrested in a DEA case in Miami and began cooperating immediately thereafter, including by providing DEA with information to facilitate the seizure of maritime shipments of cocaine from Colombia to the [Beltran-Leyva Organization’s] control in Mexico,” the complaint said.

Arturo Beltran Leyva ordered Mario Pineda Villa to kidnap, torture, and kill the informant in front of Reyes, according to the complaint. The three cops at the meeting then allegedly split a $3 million reward for their information about the mole. (Mario Pineda Villa, the alleged murderer, was also found dead later in 2009.)

But Reyes’s alleged breach of trust wasn’t suspected until 2016, when a Blackberry message intercept caught a person codenamed “Ayala” telling a drug lord that he was at the center of a DEA investigation. Ayala told the drug lord to throw out electronics to evade detection.

“Get rid of all [devices],” the Ayala figure advised, and sent the drug lord a picture of him under surveillance. “They know you are here and they want to see who you hang out with."

Soon, the DEA began to suspect Reyes was Ayala.

“The content of [Ayala’s] communications mirrored communications that Reyes had with DEA agents,” the complaint said. Reyes had been asked to help surveil the target of the investigation just a day before.

Communications by cartel bigwig Angel Dominguez Ramirez, Jr. identified the cartel’s law enforcement source as “Ivan,” the same as Reyes’s first name, and the Ayala pin was often active in the same locations as Reyes’s work phone, according to the complaint.

But Reyes’s high life as a top-cop and an allegedly top-earning cartel agent came to an abrupt halt this year. On February 2, the DEA and the Department of Justice interviewed Reyes in the American embassy in Mexico City.

In the interview, Reyes supposedly admitted to meeting with cartels, but denied leaking photos or other investigation-related intelligence.

He was indicted February 10th. The complaint was unsealed last week, shortly after the head of Mexico’s federal police confirmed an internal leak.

“When the agent realized he was under investigation by authorities not only from our country but also from the United States, he decided to voluntarily turn himself into the Chicago police,” Manelich Castilla Craviotto said. “Our suspicions were confirmed by this.”