Apple has filed its first motion to void a court order that would have it help the FBI access data on a terrorist’s iPhone by undermining software security features. The 65-page document, which lays the groundwork for a prolonged legal battle, details the company’s many objections to law enforcement’s request.
Get Data Sheet, Fortune’s technology newsletter.
“This is not a case about one isolated iPhone,” the document, filed Thursday, reads. “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 interests of hundreds of millions of individuals around the globe.”
Apple (aapl), which was not a party to the initial court proceedings, previously issued letters defending its defiant stance to customers and to employees. This is the company’s first motion directly addressing the courts and explaining the basis of its legal reasoning.
For more on Apple versus FBI startups, watch:
The filing argues that law enforcement attempted to short circuit a public discussion by seeking its ends through the U.S. court system. “Rather than pursue new legislation, the government backed away from Congress and turned to the courts, a forum ill-suited to address the myriad competing interests,” the document says. “By invoking ‘terrorism’ and moving ex parte behind closed courtroom doors, the government sought to cut off debate and circumvent thoughtful analysis.”
Apple CEO Tim Cook has previously called for Congress to take up the issue, arguing that the outcome of this would set a legal precedent for Apple to help the FBI in other investigations. FBI director James Comey has contended otherwise.
The Apple filing argues that this implementation of the All Writs Act, the law the FBI cites in support of its position, represents an overreach of government powers. It argues that the order violates the company’s First and Fifth Amendment rights by forcing it to write code that undermines Apple’s stance on personal privacy through “compelled speech,” and that it infringes on due process.
“No operating system currently exists that can accomplish what the government wants, and any effort to create one will require that Apple write new code, not just disable existing code functionality,” the filing says.
The Justice Department released a statement Thursday in response to Apple’s filing. “The Justice Department’s approach to investigating and prosecuting crimes has remained the same; the change has come in Apple’s recent decision to reverse its long-standing cooperation in complying with All Writs Act orders,” wrote DOJ spokesperson Melanie Newman, Ars Technica reports.
“Law enforcement has a longstanding practice of asking a court to require the assistance of a third-party in effectuating a search warrant. When such requests concern a technological device, we narrowly target our request to apply to the individual device. In each case, a judge must review the relevant information and agree that a third party’s assistance is both necessary and reasonable to ensure law enforcement can conduct a court-authorized search. Department attorneys are reviewing Apple’s filing and will respond appropriately in court.”
Other tech companies are expected to rally behind Apple, filing amicus briefs of their own in support of the company. Microsoft (msft), Twitter (twtr), Amazon (amzn) and Box (box) have all confirmed with Fortune their intention to do so. Sources tell Fortune that Facebook (fb) and Google (goog) are planning to back Apple as well.
Read the full filing here: