The FBI has asked Apple for assistance in unlocking two iPhones that belonged to Mohammed Saeed Alshamrani, the Saudi air force trainee alleged to have shot and killed three people at Naval Air Station Pensacola in December.

In a letter sent to Apple's general counsel and obtained by NBC, the FBI said that investigators "are actively engaging in efforts to 'guess' the relevant passcodes but so far have been unsuccessful." The FBI has court permission to access data on the iPhones, but both are password protected.

Apple said in a statement that it has been cooperating with the government's investigation.

The case calls to memory the Apple-FBI legal feud of 2016, in which the Justice Department sought to compel Apple to build a backdoor that would've bypassed the encryption on an iPhone that belonged to Syed Farook, who with his wife Tashfeen Malik shot and killed 14 people in San Bernardino, California in December 2015.

Apple argued it couldn't access the shooter's iPhone 5c because of the device's encryption, but the FBI sought a court order that would've forced Apple to rework its software to bypass the encryption. Apple said at the time that it would "set a dangerous precedent" if it was forced to backdoor one of its products.

The government eventually dropped the case when it unlocked the iPhone with the help of an unnamed third party. It was later revealed that the FBI spent over a million dollars to hack the device.