In the ongoing tussle between Apple and the FBI over unlocking iPhone encryption data, the latter said Apple gave up information to the Chinese government for “business reasons” but refuses to cooperate with US officials.

Apple, however, said it was asked by China to hand over its source code in the last two years but refused.

“I want to be very clear on this. We have not provided source code to the Chinese government,” Apple general counsel Bruce Sewell told a hearing under oath, according to Reuters.

On a previous occasion when the allegation was made, Apple deemed it a “smear” attempt by the US Department of Justice.

The issue came up again in a hearing called by a House Energy and Commerce subcommittee.

This was the second time Apple and the FBI were appearing in Congress since March to testify over access to encrypted devices.

Captain Charles Cohen, a commander in the Indiana State Police, said Apple had cooperated with China but did not have any sources to prove this, other than news reports.

The Justice Department has said it wants Apple to disclose its source code, though at the time it only wanted cooperation in writing new software that would disable passcode protections.

Security experts have said that if the US government was able to obtain Apple’s source code with a court order, other governments would demand the same.

Back in February, the FBI said it was unable to access the iPhone 5c used by one of the San Bernardino shooters without help from Apple. However, it dropped the case the day before a vital court hearing, saying it had found a way to crack the iPhone’s encryption, although it seems the technique will not work on more recent models.

In April it came to light that the identity of the firm that unlocked the iPhone may remain secret.

Security researchers said Apple should be made aware of the flaw that allowed the firm to hack the phone, in accordance with a White House vulnerabilities review process that favours disclosure.

However, Obama administration sources told Reuters the firm or group has sole ownership of the method, which means it is unlikely the method would be disclosed by the government.

Meanwhile, tech advocacy group Electronic Frontier Foundation sued the Justice Department in federal court. It is asking for disclosure of any orders from the Foreign Intelligence Surveillance Court that may have forced companies like Apple or Google to decrypt communications.