The fight between Apple and the FBI over the security protections

The fight between Apple and the FBI over the security protections on the San Bernadino iPhone has been fierce for the past few weeks, but it’s mostly been a PR battle thus far. From a legal and procedural standpoint, only two things had actually happened until yesterday: the FBI filed a motion to compel Apple to help it bypass security restrictions on the phone, and a magistrate judge ordered the company to comply. But yesterday Apple filed a motion to vacate judge Sherri Pym’s order, which lays bare the company’s actual legal argument against building a special one-off version of iOS that would allow the FBI to unlock the phone with a brute-force attack on its passcode.

Does the government have the authority to order Apple to help unlock the phone based on statute or precedent?