Facebook is said to be contesting the U.S. Department of Justice's demand.
Facebook and the Department of Justice declined to comment.
If the government prevails in the Facebook Messenger case, it could make similar arguments to force companies to rewrite other popular encrypted services such as Signal and Facebook's billion-user WhatsApp, which include both voice and text functions, some legal experts said.
Similar issues came into play during a legal fight in 2016 between the FBI and Apple over access to an iPhone owned by a slain sympathizer of Islamic State.
Unlike the San Bernardino case, where the FBI wanted to crack one iPhone in its possession, prosecutors are seeking a wiretap of ongoing voice conversations by one person on Facebook Messenger.
Facebook is arguing in court that Messenger voice calls are encrypted end-to-end, meaning that only the two parties have access to the conversation, two of the people briefed on the case said.
Ordinary Facebook text messages, such as Gmail, and other services are decrypted by the service providers during transit for targeted advertising or other reasons, making them available for court-ordered interception.
End-to-end encrypted communications, by contrast, go directly from one user to another user without revealing anything intelligible to providers.