Federal corruption charges filed last month against two Chicago cops hit close to home not just for the police but also for the FBI.

Chicago police Sgt. Xavier Elizondo had worked closely with the FBI for years. From 2007 to 2011, he was on a task force with agents who investigated narcotics trafficking and violent crimes. That meant sharing access to — and information from — confidential sources. The FBI also helped him on searches.

Now, Elizondo, 45, has been charged along with another Chicago cop, Officer David Salgado, 37, with giving phony information to judges to obtain search warrants that federal authorities say they used to steal cash and drugs.

And the FBI has cut ties with their police unit.

Elizondo’s relationship with the FBI was revealed in recently unsealed affidavits filed in the FBI’s investigation of Elizondo and Salgado, which began last fall.

“These charges illustrate the Chicago Police Department’s and the FBI’s commitment and ability to address isolated incidents where officers betray the badge,” Jeffrey Sallet, the agent in charge of the FBI’s office in Chicago, said after the indictment against the officers was announced in May.

An FBI spokeswoman declined to comment on the details in the affidavits.

According to court records, the FBI at one point considered putting undercover agents in the police department’s Area Central Gang Enforcement Unit 311 — for which Elizondo and Salgado worked. But the federal law enforcement agency rejected doing that as too risky.

The FBI wanted to get other officers to testify against Elizondo and Salgado.

“Investigating agents hope to quickly obtain the cooperation of lower-level Unit 311 officers who may be intercepted in criminal conversations with Elizondo,” the FBI said in one court document.

No other Chicago officers have been charged in the case, according to public records.

Elizondo continued to work with FBI agents assigned to narcotics and violent crimes groups after he was an FBI task force member, according to court records.

They shared access to tips from informants, and Elizondo sought the FBI’s help in executing search warrants, the records say.

And, at Elizondo’s request, the FBI registered a so-called “John Doe” informant as an FBI confidential source in November. The FBI took steps to end that informant’s federal status after he was arrested for heroin possession Jan. 8.

Some criminal cases already have been dismissed as a result of the FBI investigation, records show.

“The Cook County state’s attorney’s office is reviewing warrants and cases that involved Sgt. Xavier Elizondo and Officer David Salgado,” a spokeswoman told the Chicago Sun-Times in response to questions about the impact of the corruption scandal on criminal cases brought by the officers.

Several people have sued the city and the officers, saying they were victims of illegal searches by the unit.

According to their indictment, Elizondo and Salgado also abused the system that lets cops use the anonymous John Doe informants. One informant working for the officers gave false information to Cook County judges to get warrants allowing the cops to search property, the indictment says. They stole money, drugs and cartons of cigarettes, sharing the illegal proceeds with the informants, according to the indictment.

In December, the FBI set up a fictitious drug-dealer “stash house” on the West Side to try to catch Elizondo and Salgado pilfering money, installing video equipment in the empty apartment, records show.

An informant secretly working for the FBI approached the John Doe informant working for the officers and said he knew of an apartment that might contain a couple of kilograms of cocaine.

Later, the FBI informant and the John Doe informant huddled with Elizondo in his unmarked Ford Explorer, according to records that say the FBI informant told Elizondo he’d been in the stash house and saw about three kilos of cocaine and $25,000.

Elizondo allegedly promised to give the FBI informant a cut of whatever the officers stole, saying, “People got to eat.”

Elizondo also is accused of warning the FBI informant not to tell his friends he was working with “X” — Elizondo’s nickname.

“If you say ‘X’ on your side of the fence, be careful because people talk,” the sergeant said in a secretly recorded conversation.

The FBI informant was supposed to meet the officers to give an affidavit for a warrant to search the apartment, but he was purposely late, on orders of the FBI.

So the officers illegally had their own informant stand in for the FBI informant, who provided the original tip, according to court records.

The officers’ informant allegedly provided Cook County Circuit Judge Mauricio Araujo with information the FBI’s informant never told the cops — for one thing, that he’d bought heroin inside the apartment.

Unaware of the switch of informants, Araujo approved a search warrant. And the cops raided the stash house on Dec. 20. They found $15,000 the FBI had hidden in the hood over the stove.

But the officers also found the FBI’s secret recording equipment. Out of caution, they inventoried the entire amount of cash, instead of taking a cut, according to the FBI.

Later, Elizondo spoke to the FBI informant about finding the cameras. “If we didn’t find it, those cameras, and I’m glad we did, but, if we didn’t, man, it would have been a good Christmas,” Elizondo said, according to court records.

In January, the FBI informant gave the officers a tip about a Hyundai parked at a hotel near Midway Airport. The informant — a convicted bank robber paid more than $30,000 for his cooperation with federal authorities — told the cops they’d find cocaine and cash in the car. FBI agents hid $18,200 in marked bills in the car to see whether the officers would make a proper inventory.

On Jan. 28, the officers seized the money and stole $4,200, turning over the other $14,000 to the police department, according to the FBI.

Later, the officers falsely claimed in their police report that they “observed the vehicle to be open” and saw two Burger King bags containing $14,000 in cash, the FBI said.

FBI agents blew their cover the next day, when they went to a police complex on the West Side to tow the Hyundai to an FBI facility for processing. They ran into Salgado, who asked if they were from a rental-car company.

The agents said they were from the police Bureau of Internal Affairs, which investigates police misconduct. According to a wiretap on their phones, Elizondo and Salgado got worried internal affairs was watching them.

“Just relocate everything, all right,” Elizondo told Salgado, instructing him to conceal the money they’d allegedly stolen, according to the FBI.

On Jan. 30, the FBI searched Salgado’s apartment in Pilsen.

PAST COVERAGE:

• South Side woman could lose her home after a raid by cops accused of corruption, June 11, 2018

• Man files federal lawsuit claiming he was framed by indicted cops, June 5, 2018

• ‘Would have been a good Christmas’; traps set for indicted cops, document says, June 2, 2018

• Lawsuits, citizen complaints dog 2 CPD cops charged with stealing cash, drugs, May 9, 2018

MORE FROM THE WATCHDOGS:

• Rahm’s tabloid tie: Mayor once worked on deal with Enquirer boss linked to Trump

• Toni Preckwinkle wants to weaken law that her medical examiner doesn’t follow