Before the feds busted local rap impresario Rudy Acosta for alleged drug crimes last fall, they say he made a comment that foreshadowed a national debate ready to rage: “iPhone 6 is unhackable.”

“They can’t break in to it that’s 100 percent a fact!” Acosta allegedly said of law enforcement in a message to a confidential informant. “Feds hate i6.”

A federal agent quoted that comment in a criminal complaint filed against Acosta. But three months later, the FBI is locked in a legal battle with Apple as it tries to force the tech giant to crack into an iPhone used by one of the San Bernardino shooters. The feud has prompted protests around the globe, but federal court records in Chicago have hinted at the boiling controversy.

Most significantly, U.S. Magistrate Judge Mary Rowland ordered Apple in November to give the feds “reasonable technical assistance to enable law enforcement agents to obtain access to unencrypted data” on an Apple iPhone 5S connected to an alleged bankruptcy fraud scheme, records show.

The judge also told Apple it “may provide a copy of the encrypted data to law enforcement, but Apple is not required to attempt to decrypt, or otherwise enable law enforcement’s attempts to access any encrypted data.”

It’s not clear whether Apple complied. A spokesman for the company declined to comment. So did a spokesman for the FBI. The U.S. Attorney’s Office did not immediately respond to a request for comment. The judge issued the order at the request of prosecutors, who said they needed Apple’s help but did not ask the company to keep a record of the data on the phone.

Other examples include an attempt by federal investigators last summer to search an iPhone as part of an investigation into stolen, altered or counterfeit Treasury checks used at Wal-Mart stores in eight states. When an investigator later filed paperwork recording the execution of the search warrant, he wrote, “N/A iphone locked.”

The county-issued iPhone 5C at issue in the San Bernardino case was used by Syed Farook, who with his wife, Tashfeen Malik, killed 14 people at an office holiday party in December before they died in a gun battle with police.

A federal judge ordered Apple to assist investigators by creating specialized software that would let the FBI rapidly test random passcode combinations to try to unlock the iPhone and view data stored on it. But Apple maintains that creating such software would set a dangerous precedent, threatening data security for millions by making essentially a master key that could later be duplicated and used against other phones.

In a letter written by an Apple attorney to a federal judge in New York this month, the company identified nine government requests for help searching Apple products between Oct. 8 and Feb. 9. Three came from the Northern District of Illinois, and the lawyer mentioned a fourth received Oct. 6 in a footnote.

Federal prosecutors answered in a letter Monday that Apple previously chose not to challenge such court orders issued under the All Writs Act.

“Only more recently, in light of the public attention surrounding an All Writs Act order issued in connection with the investigation into the shootings in San Bernardino, California, has Apple indicated that it will seek judicial relief, in that matter,” federal prosecutors wrote. “Apple’s position has been inconsistent at best.”

Apple is expected to argue this week that its fight with the FBI should be kicked to Congress.

Acosta, meanwhile, has pleaded not guilty in his drug case here in Chicago. Joseph Lopez, one of his lawyers, said he’s not aware of a government attempt to search an iPhone owned by his client — or if Acosta even has one. He also said he expects Apple to lose its battle with the feds, but he thinks Apple should keep fighting.

“It would be the end of privacy, obviously,” Lopez said.

Contributing: Associated Press