Today, Apple filed a motion to vacate the district court order demanding it break security protections on a phone linked to the San Bernardino attacks. The filing lays out Apple's extensive legal objections to the FBI order, setting the stage for a lengthy court battle. "This is not a case about one isolated iPhone," the motion 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."

This is Apple's first official legal response to the order, which was filed ex parte without Apple's participation. The company has made two public statements in the days since — one to customers and another to employees — which made it clear the company intends to fight the order, but today's filing offers the first glimpse into the legal rationale for doing so.

"A dangerous power that Congress and the American people have withheld."

That legal rationale focuses in part on a recent push to update the Communications Assistance for Law Enforcement Act, which failed to pass through Congress last year. The motion portrays that legislative fight as a specific refusal to grant the powers the FBI is now seeking through the All Writs Act. "The Executive Branch ultimately decided not to pursue CALEA II, and Congress has left CALEA untouched," the motion says, "meaning that Congress never granted the authority the government now asserts."

The result is an argument that echoes an argument Tim Cook has made in a number of public statements over the past week: encryption is an issue for Congress, which the FBI has forced into the courts. "Rather than pursue new legislation, the government backed away from Congress and turned to the courts," the filing argues, "a forum ill-suited to address the myriad competing interests."

"This is not a case about one isolated iPhone."

Apple particularly objects to the sudden nature of last Tuesday's ex parte order, combined with the high-profile nature of a terrorism investigation. "By invoking 'terrorism' and moving ex parte behind closed courtroom doors," the motion continues, "the government sought to cut off debate and circumvent thoughtful analysis."

The motion also cites a constitutional issues with the ruling from both the First and Fifth Amendments. Apple's lawyers argue that the compulsion to write new security-breaking code "creates an unprecedented burden on Apple and violates Apple’s First Amendment rights against compelled speech." The filing goes on to argue that the same compulsion also violates the Fifth Amendment's due process clause. If the company is unsuccessful in district and appeals courts, those objections could lay the groundwork for a Supreme Court appeal.