A Chicago DEA agent could spend the rest of his life in prison after being busted by federal authorities for allegedly helping a Puerto Rican-based gang traffic drugs and guns – and then joining the agency to help them cover it up.

Fernando Gomez, 41, was ordered held without bond Thursday, according to the Chicago Tribune, and is facing a litany of firearm and narcotics-related charges.

“Fernando Gomez is a special agent of the DEA, an organization committed to upholding the nation’s drug laws and relentless in its pursuit of narcotics traffickers,” U.S. Attorney Geoffrey S. Berman said last week. “But as alleged, Gomez joined the DEA to betray those laws, and to help narcotics traffickers evade detection by law enforcement.  He will now be prosecuted to the full extent of the law.”

Federal investigators say during his career as a police officer and DEA agent, Gomez – as far back as 2006 -- secretly started working with La Organizacion de Narcotraficantes Unidos, a Puerto Rico-based “racketeering enterprise involved in drug dealing and murders.

CHARGES IN DEATH OF ANTI-GANG CRUSADER WHO LOST HER DAUGHTER

“Gomez, while working as a detective with the City of Evanston Police Department in Illinois, obtained firearms from drug dealers, transported those firearms to Puerto Rico, and provided those firearms to Jose Martinez-Diaz, a/k/a “Tony Zinc,” the Justice Department said in a statement.

They added that Gomez also participated in a conspiracy to distribute cocaine.

“Gomez then joined the DEA so that he could help members of the narcotics conspiracy, including Martinez-Diaz, evade prosecution by law enforcement,” it said.

Martinez-Diaz previously has been charged in the alleged scheme and Gomez himself is facing charges of participating in a narcotics conspiracy involving the distribution of five kilograms or more of cocaine and aiding and abetting in the possession of firearms, among other counts.

He was arrested at the DEA’s Chicago offices last Tuesday.

“When Gomez swore to uphold our nation’s drug laws, he never had any intention of doing that,” Assistant U.S. Attorney Jordan Estes wrote in a letter to a judge this week that was obtained by the Chicago Sun-Times. “From the beginning, he was a double agent.”

Gomez’s attorneys say he was in the Marines prior to going into law enforcement and claim his only link to Puerto Rico is when he went on assignment there with the DEA, the Chicago Tribune reported.