In what is quickly becoming one of the closest-watched cases in the country, Apple is now at loggerheads with the Department of Justice and FBI over its refusal to unlock the iPhone of one of the San Bernardino shooters.

The government has demanded that Apple provide technical assistance to unlock the phone so that the FBI can search its contents for evidence. Specifically, the government wants Apple to develop software to override the phone’s security feature that wipes data stored on the phone after ten failed attempts to enter the correct password. Federal prosecutors have said that the software would affect only the seized phone, and that they need access to the phone because, based upon communications already recovered from Apple’s iCloud servers, they believe it may contain communications and data relevant to the shooting that could shed light on whether the shooters were planning other attacks and whether they received any foreign aid.

Apple recently filed a lengthy motion opposing the government’s motion to compel. The company’s central argument is that the operative statute (the All Writs Act of 1789) does not give the Department of Justice the power to compel Apple to create the new software that would be required to bypass the iPhone’s embedded security.

In its recent court filing, Apple argues that the All Writs Act “is intended to enable the federal courts to fill in gaps in the law so they can exercise the authority they already possess by virtue of the express powers granted to them by the Constitution and Congress; it does not grant the courts free-wheeling authority to change the substantive law, resolve policy disputes, or exercise new powers that Congress has not afforded them.”

Apple describes the contemplated software as “a back door to defeat the encryption on the iPhone.” The company notes that Congress already has considered and rejected legislation that would have accomplished what the government now seeks to achieve through judicial decree. And from a practical standpoint, the company decries the effort it would take to develop and administer such technology as approaching herculean proportions.

Further, Apple argues, the order flies in the face of essential protections guaranteed by the U.S. Constitution. In Apple’s view, ordering it to create code is tantamount to compelling speech, in violation of the First Amendment. Additionally, the company argues, “conscripting a private party with an extraordinarily attenuated connection to the crime to do the government’s bidding in a way that is statutorily unauthorized, highly burdensome, and contrary to the party’s core principles, violates Apple’s substantive due process right to be free from ‘arbitrary deprivation of [its] liberty by government.’”

This case highlights a deepening disconnect between technology companies and the law enforcement community, and both sides have called for Congress to take legislative action. Apple CEO Tim Cook has said the company is prepared to take the fight to the U.S. Supreme Court, if necessary. A hearing on the motion is scheduled for March 22 in the United States District Court for the Central District of California.