Apple and the Federal Bureau of Investigation (FBI) head to court Tuesday over a judge's order that Apple hack into an iPhone linked to the San Bernardino terror attack, in what is likely to be only the first skirmish in a long legal battle.
Judge Sheri Pym ordered Apple February 16 to find a way around auto-encryption software in its iOS9 mobile operating system that has stymied FBI attempts to access data on an iPhone 5c used by Syed Rizwan Farook.
Farook and his wife killed 14 people in the December 2 shooting attack apparently inspired by the extremist group ISIS.
Apple refused the order, saying it would set a "dangerous precedent" that would undermine privacy and freedom.
Privacy advocates and other tech companies have closed ranks with Apple, arguing that providing any back door to encrypted data poses grave risks of abuse by governments and criminals alike.
At issue in Tuesday's hearing in federal court in Riverside, California, is whether federal law allows a court to force Apple to write software to bypass its own security protocols.
The government argues an 18th-century US law, the All Writs Act, gives it the authority to make Apple crack the device. Apple says the order violates its constitutional rights and other federal laws.
But the larger question being debated is much broader: when data security comes up against public safety, which should take precedence?
Law enforcement authorities say their work relies on the ability to gather evidence of crimes, such as that gleaned from legal wiretaps and searches.
In a world where people's lives and communications are increasingly stored in encrypted virtual vaults that even their inventors cannot open, those investigations stop at the door.
Authorities have long demanded tech companies provide a back door to encrypted data and devices - something tech companies say would cripple digital security around the world.
US legislators have as yet stopped short of requiring tech devices and platforms to provide government access to data.
But competing bills in California and New York would ban mobile devices with auto-encryption like that in the iPhone, and a bill addressing encryption is expected to be introduced in the US Senate in the coming weeks, according to media reports.
A separate bill banning state restrictions on encrypted devices was introduced in the US House of Representatives.
In the meantime, the battle will continue in the courts. It is expected to be a long one, with experts saying the question could end up before the Supreme Court before Apple or the FBI will stand down.