Apple on Thursday urged a Riverside federal judge to scrap her recent order requiring the Silicon Valley giant to help the FBI unlock the iPhone of one of the San Bernardino shooters, calling it an unprecedented threat to the privacy and smartphone security rights of the public.

In court papers, Apple argues that U.S. Magistrate Judge Sheri Pym’s order is unconstitutional, saying it violates the company’s free speech rights and would illegally force Apple to develop a “backdoor” software program for the government that “undermines the security mechanisms of its own products.”

“This is not a case about one isolated iPhone,” Apple’s legal team wrote. “Rather, this case is about the Department of Justice and the FBI seeking through the courts a dangerous power that Congress and the American people have withheld: the ability to force companies like Apple to undermine the basic security and privacy of hundreds of millions of individuals around the globe.”

Pym had given Apple until Friday to file its response to the U.S. Justice Department’s legal position, but the company moved Thursday as the public debate over the showdown continued to unfold. The judge is holding a March 22 hearing in the case, which could mark a turning point in the ongoing national debate pitting U.S. security and law enforcement interests against the tech industry’s staunch defense of privacy protections.

Regardless of Pym’s eventual decision, her ruling is unlikely to be the last legal word in the case. Apple and the government are expected to challenge any orders they lose, likely moving the case to the 9th U.S. Circuit Court of Appeals and, perhaps, eventually the U.S. Supreme Court.

FBI Director James Comey on Thursday told a congressional committee that the court case may set precedent for how the government and tech companies deal with the issue in the future, calling it “the hardest question I’ve seen in government.”

The controversy has exploded into the public eye with Pym’s order last week in Riverside requiring Apple to help unlock the iPhone 5C of one of the San Bernardino County shooters, Syed Rizwan Farook, who was killed after he and his wife gunned down 14 people in a terror attack.

Apple CEO Tim Cook has repeatedly said the company will contest the case all the way to the Supreme Court. The tech industry has rallied around Apple, with Microsoft on Thursday indicating it will be one of the companies to file legal arguments in support of the iPhone maker’s stance next week. Google and Facebook have also backed Cook.

In Thursday’s brief, Apple’s high-powered legal team, led by former U.S. Solicitor General Theodore Olson, argued that the judge’s order is interfering with the political debate between government and tech leaders trying to balance national security and law enforcement needs with privacy concerns.

Apple’s legal arguments essentially fall into four categories: that the demand violates the First Amendment by forcing the company to write the software to hack the phone, a form of “compelled speech”; that it violated Apple’s due process rights; that the requests place an unprecedented burden on the company, forcing it to create a separate apparatus to create a “brute force tool” for the FBI to hack phones, particularly with the possibility that similar government requests will proliferate; and that the law being used to require the help simply can’t be used for that purpose.

Apple specifically argues that the 1789 law being used by the FBI to demand Apple’s technical help does not cover such sweeping demands of a company.

“Congress has never authorized judges to compel innocent third parties to provide decryption services to the FBI,” Apple wrote in court papers.

Legal experts said Thursday that the judge has a tough balancing act to consider, with one calling the case a “tiger by the tail.”

Rory Little, a former federal prosecutor and Hastings College of the Law professor, believes Apple’s best argument centers on the novelty of creating the technology to hack the phone’s security.

“I felt all along (Apple’s) most compelling argument is that you’re asking us to create something that does not exist,” he said.

Apple executives, speaking to the media Thursday on condition of anonymity, said the FBI’s position “hijacks an important international debate” on how to deal with the encryption issue when law enforcement is seeking evidence from smartphones and other devices.

In a separate case in New York, Apple has disclosed that the government has sought similar orders in at least a dozen cases since last fall. All of the government requests for Apple’s help in unlocking iPhones have been filed under the All Writs Act, an 18th-century catchall law at the center of the legal battle that gives the government wide leeway to seek court orders forcing individuals or institutions to take some action.

In court papers, federal prosecutors have criticized Apple’s privacy arguments, saying the San Bernardino request is narrow and would not force Apple to relinquish technical secrets that protect the privacy rights of customers. Federal prosecutors in the Brooklyn case previously disclosed that Apple has in fact cooperated in other efforts to unlock iPhones.

Apple argues the request in the San Bernardino case is the most sweeping of all. In declarations submitted on Thursday, Erik Neuenshwander, Apple’s manager of user privacy, estimates it would take a team of six to 10 Apple executives and engineers at least a month to develop and then test the security-cracking formula, creating “something that, to my knowledge, Apple has never done before.”

In addition, Lisa Olle, an Apple lawyer who dealt with legal requests to the company in the aftermath of December’s San Bernardino terror attacks, said in court papers if such orders are allowed, Apple would need to establish a new legal team just to field the issues raised in each case.

Howard Mintz covers legal affairs. Contact him at 408-286-0236 or follow him at Twitter.com/hmintz