SAN FRANCISCO — The encryption debate between Apple and the F.B.I. might have found its new test case.
The F.B.I. said on Tuesday that it had asked Apple for the data on two iPhones that belonged to the gunman in the shooting last month at a naval base in Pensacola, Fla., possibly setting up another showdown over law enforcement’s access to smartphones.
Dana Boente, the F.B.I.’s general counsel, said in a letter to Apple that federal investigators could not gain access to the iPhones because they were locked and encrypted and their owner, Second Lt. Mohammed Saeed Alshamrani of the Saudi Royal Air Force, is dead. Two people who had seen the letter described it to The New York Times on the condition of anonymity because the government’s investigation into the shooting is still active.
The F.B.I. has a search warrant for the devices and is seeking Apple’s assistance executing it, the people said.
Lieutenant Alshamrani is the Saudi Air Force trainee who federal authorities believe shot and killed three sailors at Naval Air Station Pensacola in December.
The case could become a new point of contention in a long-running dispute between Apple and the F.B.I. over what digital information should be accessible to law enforcement. In 2014, Apple started building encryption into iPhones that can be unlocked only with a given device’s password, meaning even Apple cannot bypass the security. The technology has frustrated law enforcement authorities, who say Apple has given criminals a safe haven.
Apple said in a statement that it had given the F.B.I. all the data “in our possession” related to the Pensacola case when it was asked a month ago. “We will continue to support them with the data we have available,” the company said. Apple regularly complies with court orders to turn over information it has on its servers, such as iCloud data, but it has long argued that it does not have access to material stored only on a locked, encrypted iPhone.
An F.B.I. spokeswoman confirmed the existence of the letter, which was first reported by NBC News, but declined to comment further.
Before sending the letter, the F.B.I. checked with other government agencies and its national security allies to see if they had a way into the devices — but they did not, according to one of the people familiar with the investigation.
The official said the F.B.I. was not asking Apple to create a so-called backdoor or technological solution to get past its encryption that must be shared with the government. Instead, the government is seeking the data that is on the two phones, the official said.
Apple has argued in the past that obtaining such data would require it to build a backdoor, which it said would set a dangerous precedent for user privacy and cybersecurity.
The Pensacola case resembles the 2016 dispute between Apple and the F.B.I. over the iPhone of the man who, along with his wife, shot and killed 14 people in San Bernardino, Calif. As in that case, there is a dead gunman, a court authorization to gain entry to a phone, and an early stalemate between law enforcement and Apple.
But the San Bernardino investigation turned into a high-stakes showdown after a federal judge ordered Apple to help the authorities gain entry to the phone. Such a court order has not been issued in the Pensacola case, and it is does not appear that the F.B.I. has yet sought such a ruling.
The letter could be the first step toward such an order, as the F.B.I. would likely need to show a judge that Apple had refused to assist in executing a warrant. Apple did not respond to a question about whether it would comply with the F.B.I.’s request in the Pensacola investigation.
After the federal judge ordered Apple to create a way to open the San Bernardino gunman’s phone in 2016, Tim Cook, Apple’s chief executive, responded with a 1,100-word letter in which he said that creating such a backdoor would compromise the security of every iPhone.
“The government suggests this tool could only be used once, on one phone,” he said. “But that’s simply not true. Once created, the technique could be used over and over again, on any number of devices.”
Mr. Cook made an aggressive argument to the public that the Obama administration’s actions would undermine people’s privacy and security. But he may find it more difficult to attack the Trump administration, which has long dangled the threat of tariffs on Apple’s products.
Mr. Cook has become an ally of President Trump, visiting him regularly in Washington and recently hosting him at a Mac computer factory in Texas, where the president claimed he had helped spur its construction when it had actually been open for six years.
The dispute over the San Bernardino case was resolved when the F.B.I. found a private company that was able to bypass the iPhone’s encryption. The Justice Department’s Office of Inspector General later found that the F.B.I. had not exhausted all possible solutions to unlock the phone before it tried to force Apple to build a way past the encryption.
Both sides have since doubled down on their stances. Apple has made its encryption even tougher, closing gaps that law enforcement had exploited to gain entry to iPhones.
And Attorney General William P. Barr has recently turned up his criticism of encryption. He 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.”
In several speeches last year, he noted that drug cartels, human trafficking rings and child pornographers depended on consumer products with strong encryption, such as WhatsApp and Signal, and he has singled out Facebook’s efforts to wrap all of its products in virtually unbreakable encryption as a scourge for law enforcement.
“We’re talking about when you have a warrant and probable cause and you cannot get the information,” Mr. Barr said at a Wall Street Journal conference in Washington last month.
Companies like Facebook are selling the idea that “no matter what you do, you’re completely impervious to government surveillance,” Mr. Barr said. “Do we want to live in a society like that? I don’t think we do.”
Jack Nicas reported from San Francisco, and Katie Benner from Washington.