Apple says the government "attempts to rewrite history" with its request for help unlocking an iPhone of one of the San Bernardino shooters by stretching the law far wider than the Constitution and the lawmakers have intended.

"The Founders would be appalled," Apple wrote in its last court filing before it squares off against the government in federal court in California at a hearing on March 22.

"The government ... contends that because this Court issued a valid search warrant, it can order innocent third parties to provide any service the government deems 'necessary' or 'appropriate' to accomplish the search."

The FBI is asking Apple to write software that would lift security features preventing the FBI from cracking the passcode on the phone used by Syed Rizwan Farook, who along with his wife killed 14 people in the San Bernardino shooting on Dec. 2.

As its legal basis, the FBI's court order relies on the All Writs Act, a broad 1789 law that gives courts power to, among other things, compel companies' cooperation in investigations and has been used by the government for that purpose.

Apple argues that the U.S. attorneys are misinterpreting prior cases and their application of the law is overreaching: "The government attempts to rewrite history by portraying the Act as an all-powerful magic wand rather than the limited procedural tool it is," Apple's lawyers write, comparing the request to "conscription" of the company and its employees that would "pose a severe threat" to Apple's autonomy.

Apple CEO Tim Cook has said that writing software to comply with the FBI's request would be creating the equivalent of cancer, as the company says it would amount to a master key that could undermine security of other iPhones. Apple's position has garnered support from dozens of civil liberties groups and tech companies, including Google, Facebook, Microsoft and Intel.

Apple is also making a free speech claim:

"Under the government's view, the state could force an artist to paint a poster, a singer to perform a song, or an author to write a book, so long as its purpose was to achieve some permissible end, whether increasing military enrollment or promoting public health. ... The First Amendment does not permit such a wholesale derogation of Americans' right not to speak."

U.S. Attorneys, in their latest court filing, argued that Apple has "overblown" security fears linked to the unlocking of the specific iPhone, using them as a "diversion" from what they describe as a very modest and targeted request. The Justice Department has the support of a number of law enforcement groups and relatives of San Bernardino shooting victims.

Both sides have acknowledged that the matter is ultimately a dispute over precedent: what should be the scope of government's power to compel the cooperation of an unwilling tech company to gain access to encrypted information.

FBI Director James Comey has warned that encryption is creating, for the first time in U.S. history, "warrantproof" spaces where investigators can't reach even with a probable cause warrant. Apple argues this the issue should be settled by lawmakers and not courts. President Obama has urged parties and their supporters to avoid absolutist views.

Copyright 2016 NPR. To see more, visit