SAN FRANCISCO (Reuters) - A U.S. judge on Monday rejected a bid by two civil rights groups that had sought to force the release of documents describing a secret U.S. government effort to compel Facebook Inc to decrypt voice conversations between users on its Messenger app.

Silhouettes of laptop users are seen next to a screen projection of Facebook logo in this picture illustration taken March 28, 2018. REUTERS/Dado Ruvic/Illustration

The issue arose in a joint federal and state investigation into activities of the MS-13 gang in Fresno, California, revolving around the end-to-end encryption Facebook uses to protect calls on its Messenger service from interception.

End-to-end encryption means that only the two parties in the conversation have access to it.

Groups including the American Civil Liberties Union argued that the public’s right to know the state of the law on encryption outweighed any reason the U.S. Justice Department might have for protecting a criminal probe or law-enforcement method.

The Washington Post newspaper also filed a legal brief to unseal the records.

However, U.S. District Judge Lawrence O’Neill in Fresno ruled that the documents described sensitive law enforcement techniques and releasing a redacted version would be impossible.

“The materials at issue in this case concern techniques that, if disclosed publicly, would compromise law enforcement efforts in many, if not all, future wiretap investigations,” O’Neill wrote, adding that the underlying criminal case was still ongoing.

An ACLU representative and a spokeswoman for the U.S. Justice Department both declined to comment.

Both the Justice Department and Facebook’s arguments in response to the ACLU were themselves kept secret. However, O’Neill wrote that Facebook supported the ACLU’s requests to unseal, with limited redactions, while the government opposed them.

Neither U.S. prosecutors nor Facebook have commented publicly about the Messenger case because of a court gag order. But Reuters reported last year that investigators failed in a courtroom effort to force Facebook to wiretap Messenger voice calls.

U.S. telecommunications companies are required to give police access to calls under federal law, but many apps that rely solely on internet infrastructure are exempt. Facebook contended Messenger was covered by that exemption, sources told Reuters.

Public court filings in the Fresno case showed the government was intercepting all ordinary phone calls and Messenger texts between the accused gang members.

An FBI affidavit cited three Messenger calls that investigators were unable to hear. The participants in those calls were arrested anyway.