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.”