Following a deadly shooting at a Pensacola naval base in December, Attorney General William Barr accused Apple, Inc. of failing to provide “substantive assistance” in the investigation because the company refused to unlock two iPhones used by the shooter, setting up yet another showdown with the tech giant.

In a previous showdown between the federal government and Apple, in which the FBI sought an order from the court to compel Apple to assist by decrypting a cell phone, the drama ended rather anti-climatically because the FBI essentially cracked the phone’s security without Apple’s assistance. It remains to be seen how this new clash will resolve itself, but the stakes have only increased for both sides. The FBI and all of law enforcement are more concerned about the inability to access smart phones and other devices as companies install better security features. At the same time, Apple is stepping up the security on its devices with each new iteration of its mobile operating system, while marketing itself as a protector of individual privacy.

In the current faceoff, the government is seeking assistance in decrypting an iPhone 5 and an iPhone 7 owned by Lt. Mohammed Saeed Alshamrani, an aviation student from the Saudi Royal Air Force, so that the FBI can access the data and information stored on the phones. Alshamrani killed three U.S. sailors before a deputy sheriff responding to the attack killed him. Earlier this month, FBI Director Chris Wray told Congress that Alshamrani shot one of his phones during the attack in an effort to destroy it, but that the FBI had been able to reconstruct it. The federal government has labeled the shooting a terrorist attack.

After it recovered the iPhones, the FBI obtained a court order authorizing it to search them. With no way of obtaining the passwords to the phones, Dana Boente, the FBI’s general counsel, sent Apple a letter requesting assistance on Jan. 8. A few days later, Barr issued his public rebuke of the company.

In response, Apple issued a statement disagreeing with Barr’s accusation:

“We reject the characterization that Apple has not provided substantive assistance in the Pensacola investigation. Our responses to their many requests since the attack have been timely, thorough and are ongoing.”

This disagreement echoes an earlier fight between the federal government and Apple following the 2015 San Bernardino terrorist attack.

What Happened After San Bernardino?

In December 2015, Syed Rizwan Farook and his wife Tashfeen Malik carried out a mass shooting at his workplace, killing 14 people. Farook died in the attack, but he had an iPhone 5c, which the FBI wanted to access. Farook had received this cell phone from his employer, the San Bernardino County Public Health Department, which authorized the FBI to access it. However, because Farook previously set his iPhone so that one needed a four-digit password to access it, the FBI agents could not readily access it. Moreover, trying to attempt to randomly enter numbers to ascertain the correct password could cause the iPhone to erase all its data once agents had reached a preset number of failed password attempts.

In February 2016, the FBI sought Apple’s assistance to access the data stored on Farook’s iPhone. When Apple refused to cooperate in a manner that satisfied the FBI, it obtained a federal court order pursuant to the All Writs Act, requiring Apple to assist the FBI in unlocking Farook’s cell phone. In 1789, Congress first enacted the All Writs Act, 28 U.S.C. § 1651(a), which authorized“[t]he Supreme Court and all courts established by Act of Congress [to] issue all writs necessary or appropriate in aid of their respective jurisdictions and agreeable to the usages and principles of law.”

Pursuant to this court order, the FBI wanted Apple to create a backdoor into its iOS mobile operating system. Apple balked at this suggestion, asserting that it would render the security of each and every iPhone user vulnerable to attack based on this approach. Specifically, Apple maintained that “Backdoors can also be exploited by those who threaten our national security and the data security of our customers.”

In the end, the FBI did not seek enforcement of the court order mandating that Apple provide assistance to the FBI, because it was able to get access to Farook’s iPhone without Apple’s help. It is still unclear how the FBI managed this, but one theory is that Cellebrite, an Israeli digital forensics firm, was able to access his phone. Another theory is that hackers found a flaw in the operating system for Farook’s iPhone that they were able to exploit and sell to the FBI. Regardless, the FBI paid $1.3 million by its own admission to whoever assisted it in gaining access into Farook’s phone, and a court did not have to decide whether Apple should have to decrypt its operating system.

Today’s Looming Showdown

That background brings us back to the Pensacola terrorist attack, Alshamrani’s two iPhones, and the looming showdown between the FBI and Apple. No doubt, both sides have learned from their previous encounters, including San Bernardino. The FBI is likely mulling over other options to gain access, including paying private firms or renegade hackers to assist in the challenge.

If the FBI mounts a court challenge, it will want to assert that it has taken all feasible measures to gain access. The request in any court order will be similar to the San Bernardino case in that the basis will likely be pursuant to the All Writs Act and that the FBI will seek decryption by Apple. In response, Apple will reiterate its previous arguments about the vulnerabilities that would be created by opening any backdoor into its operating system.

Since 2016, Apple researchers have worked to strengthen its operating system from both hackers and companies like Cellebrite. Not to be deterred, however, Cellebrite claimed last year that it could unlock any iPhone running iOS Version 12.3 Operating System or earlier versions. More recently, a hacker with the handle Axi0mX found a flaw in Apple devices that essentially enables people to jailbreak every iPhone from 4S to X. In other words, it’s quite possible that the FBI could gain access to either of Alshamrani’s iPhones without relying on aid from Apple.

A second concern for the FBI regarding any request for assistance is the legal standard provided by decisions analyzing the All Writs Act. Interpreting the statute in United States v. New York Telephone Company, 434 U.S. 159 (1977), the Supreme Court determined that “the power of federal courts to impose duties upon third parties is not without limits.” Specifically, the Court explained that any order consistent with the Act must not cause “[u]nreasonable burdens” on a third party.

Apple’s position is influenced in part by marketing itself to consumers as the protector of their privacy, which, in turn, helps them sell their technology. Nonetheless, Apple explicitly claims that creating the access that the FBI seeks would weaken its operating system for everyone. It is unclear how accurate that position is, but it would be in line with the Supreme Court’s interpretation that any orders cannot create unreasonable burdens. In other words, Apple has a strong argument that essentially breaking its operating system at the FBI’s request is breaking it for every iPhone user and thus unreasonably burdensome.

Of course, terrorism and other circumstances of national security are not the only situations in which the government seeks Apple’s assistance in unlocking iPhones. Courts have received applications for orders pursuant to the All Writs Act for garden variety federal crimes. As this issue and ones like it are going to recur, it might be time to consider a solution other than the All Writs Act. Indeed, Congress could develop legislation that would provide courts, law enforcement officials, and consumers insight as to how better address these national security concerns. Until then, courts will flounder with a statute developed in 1789 for circumstances that the framers could not have envisioned.

Image: The official FBI seal is seen on an iPhone’s camera screen outside the J. Edgar Hoover headquarters February 23, 2016 in Washington, DC. Photo by Chip Somodevilla/Getty Images