WASHINGTON — Attorney General William P. Barr declared on Monday that a deadly shooting last month at a naval air station in Pensacola, Fla., was an act of terrorism, and he asked Apple in an unusually high-profile request to provide access to two phones used by the gunman.
Mr. Barr’s appeal was an escalation of an ongoing fight between the Justice Department and Apple pitting personal privacy against public safety.
“This situation perfectly illustrates why it is critical that the public be able to get access to digital evidence,” Mr. Barr said, calling on technology companies to find a solution and complaining that Apple had provided no “substantive assistance.”
Detailing the results of the investigation into the Dec. 6 shooting that killed three sailors and wounded eight others, Mr. Barr said the gunman, Second Lt. Mohammed Saeed Alshamrani — a Saudi air force cadet training with the American military — had displayed extremist leanings.
Mr. Alshamrani warned on last year’s anniversary of the Sept. 11 attacks that “the countdown has begun” and posted other anti-American, anti-Israeli and jihadist social media messages, some within hours of attacking the base, Mr. Barr said. “The evidence shows that the shooter was motivated by jihadist ideology,” Mr. Barr said.
The government has also removed from the country some 21 Saudi students who trained with the American military, Mr. Barr said. He stressed that investigators found no connection to the shooting among the cadets but that some had ties to extremist movements or possessed child pornography. Mr. Barr said the cases were too weak to prosecute but that Saudi Arabia kicked the trainees out of the program.
Mr. Barr focused attention on the Justice Department’s fight on advanced encryption and other digital security measures by taking aim at Apple, which has long touted security as a major feature of its phones. In 2014, Apple started building encryption into iPhones that can be unlocked only with the device’s password or a fingerprint reader, and said that it cannot bypass the security.
The technology has frustrated law enforcement officials, who accuse Apple of providing a safe haven for criminals. Justice Department officials said that they need access to Mr. Alshamrani’s phones to see data and messages from encrypted apps like Signal or WhatsApp to determine whether he had discussed his plans with others at the base and whether he was acting alone or with help.
Apple did not respond to a request for comment. But it will not back down from its unequivocal support of encryption that is impossible to crack, people close to the company said.
Apple has argued that obtaining data from phones themselves would require it to build a backdoor, which it said would set a dangerous precedent for user privacy and cybersecurity. Cracking one phone would compromise the security of all Apple devices, company executives have warned, saying that if it were to develop a way to crack into one phone, law enforcement officials would demand they use it repeatedly.
Mr. Barr indicated that he is ready for a sharp fight. “We don’t want to get into a world where we have to spend months and even years exhausting efforts when lives are in the balance,” he said. “We should be able to get in when we have a warrant that establishes that criminal activity is underway.”
The confrontation echoed the legal standoff over an iPhone used by a gunman who killed 14 people in a terrorism attack in San Bernardino, Calif., in late 2015. Apple defied a court order to assist the F.B.I. in its efforts to search his device, setting off a fight over whether privacy enabled by impossible-to-crack encryption harmed public safety.
The San Bernardino dispute was resolved when the F.B.I. found a private company to bypass the iPhone’s encryption. Tensions between the two sides, however, remained, and Apple worked to ensure that neither the government nor private contractors could open its phones.
Justice Department officials have long pushed for a legislative solution to the problem of “going dark,” law enforcement’s term for how increasingly secure phones have made it harder to solve crimes, and the Pensacola investigation gives them a prominent chance to make their case. Mr. Barr said that Trump administration officials have again begun discussing a legislative fix.
But the F.B.I. has been bruised by Mr. Trump’s unsubstantiated complaints that former officials plotted to undercut his presidency and by a major inspector general’s report last month that revealed serious errors with aspects of the Russia investigation. A broad bipartisan consensus among lawmakers allowing the bureau to broaden its surveillance authorities is most likely elusive, though some lawmakers singled out Apple for its refusal to change its stance.
“Companies shouldn’t be allowed to shield criminals and terrorists from lawful efforts to solve crimes and protect our citizens,” Senator Tom Cotton, Republican of Arkansas, said in a statement. “Apple has a notorious history of siding with terrorists over law enforcement. I hope in this case they’ll change course and actually work with the F.B.I.”
Apple typically complies with court orders to turn over information on its servers and has given investigators materials from Mr. Alshamrani’s iCloud account but said that it would turn over only the data it had, implying that it would not work to unlock the phones.
Investigators secured a court order within a day of the shooting allowing them to search the phones, Mr. Barr said. He turned up the pressure on Apple a week after the F.B.I.’s top lawyer, Dana Boente, asked the company for help searching Mr. Alshamrani’s iPhones.
Officials said that the F.B.I. is still trying to access the phones on its own and approached Apple only after asking other government agencies, foreign governments and third-party technology vendors for help, to no avail.
The devices were older models: an iPhone 7 with a fingerprint reader and an iPhone 5, according to a person familiar with the investigation.
Justice Department officials said that investigators have yet to make a final determination about whether Mr. Alshamrani conspired with others. They said that Saudi government was offering “unprecedented” cooperation but that “we need to get into those phones.”
Mr. Barr and other law enforcement officials described a 15-minute shootout before security officers shot Mr. Alshamrani to death. During the firefight, Mr. Alshamrani paused at one point to shoot one of his phones once, Mr. Barr said, adding that his other phone was also damaged but that the F.B.I. was able to repair them well enough to be searched.
Mr. Alshamrani also shot at photographs of President Trump and one of his predecessors, Mr. Bowdich said. A person familiar with the investigation identified the unnamed president as George W. Bush.
His weapon was lawfully purchased in Florida under an exemption that allows nonimmigrant visa holders to purchase firearms if they have a valid hunting license or permit, officials said.
Law enforcement officials have continued to discuss Mr. Alshamrani’s phones with Apple, they said.
“We’re not trying to weaken encryption, to be clear,” David Bowdich, the deputy director of the F.B.I., said at the news conference, noting that the issue has come up with thousands of devices that investigators want to see in other cases.
“We talk about this on a daily basis,” he said. Mr. Bowdich was the bureau’s top agent overseeing the San Bernardino investigation and was part of the effort to push Apple to crack into the phone in that case.
But much has also changed for Apple in the years since Tim Cook, the chief executive of Apple, excoriated the Obama administration publicly and privately in 2014 for attacking strong encryption. Obama officials who were upset by Apple’s stance on privacy, along with its decision to shelter billions of dollars in offshore accounts and make its products almost exclusively in China, aired those grievances quietly.
Now Apple is fighting the Trump administration, and President Trump has shown far more willingness to publicly criticize companies and public figures. When he recently claimed falsely that Apple had opened a manufacturing plant in Texas at his behest, the company remained silent rather than correct him.
At the same time, Apple has financially benefited more under Mr. Trump than under President Barack Obama. It reaped a windfall from the Trump administration’s tax cuts, and Mr. Trump said he might shield Apple from the country’s tariff war with China.
He had said last month that finding a way for law enforcement to gain access to encrypted technology was one of the Justice Department’s “highest priorities.”
Mr. Alshamrani, who was killed at the scene of the attack, came to the United States in 2017 and soon started strike-fighter training in Florida. Investigators believe he may have been influenced by extremists as early as 2015.
Mr. Barr also refuted reports that other Saudi trainees had known of and recorded video of the shooting. Mr. Alshamrani arrived at the scene by himself and others in the area began recording the commotion only after he had opened fire, Mr. Barr said. They and other Saudi cadets cooperated with the inquiry, he added.
Jack Nicas contributed reporting from San Francisco.