The shooter, Second Lieutenant Mohammed Saeed Alshamrani, 21, also wounded eight people before being killed by law enforcement during the Dec. 6, 2019 attack. He was on the base as part of a US Navy training program designed to foster links with foreign allies.
The Justice Department succeeded in unlocking the encryption on the shooter's iPhone after Apple Inc declined to do so, Barr told reporters on a conference call. Apple later disputed his version, saying it cooperated to the extent that its technology allowed.
"The information from the phone has already proved invaluable," Barr said.
Barr called on Congress to take action forcing Apple and other tech companies to help law enforcement agencies get through encryption during criminal investigations.
"Apple's decision has dangerous consequences," Barr said. "Many of the technology companies that advocate most loudly for warrant-proof encryption...are at the same time willing to accommodate authoritarian regimes."
Apple said: "It is because we take our responsibility to national security so seriously that we do not believe in the creation of a backdoor — one which will make every device vulnerable to bad actors," Apple said in a statement.
"There is no such thing as a backdoor just for the good guys, and the American people do not have to choose between weakening encryption and effective investigations."
In February, an audio recording purporting to be from the terrorist group al-Qaeda in the Arabian Peninsula (AQAP) claimed responsibility for the attack, but provided no evidence.
Prior to the shooting spree, the shooter posted criticism of US wars and quoted al-Qaeda leader Osama bin Laden on social media.
"The Pensacola attack was actually the brutal culmination of years of planning," FBI Director Christopher Wray said on Monday, adding that evidence showed Alshamrani had been radicalized by 2015.
Saudi Arabia in January withdrew its remaining 21 cadets from the US military training program and brought them home, after the Justice Department's investigation revealed some had accessed child pornography or had social media accounts containing extremist or anti-American content.
Source: Reuters