The Federal Bureau of Investigation (FBI) has discovered a link between the gunman in a deadly attack at a military base in Pensacola, Florida that occurred last December and an al-Qaeda operative, a U.S. official revealed Monday.

U.S. Attorney General William Barr and FBI Director Chris Wray held a news conference Monday to discuss developments in the shooting that happened late last year at the Pensacola Naval Air Station, in which a Saudi Air Force officer, Mohammed Alshamrani, killed three U.S. sailors and injured eight additional people.

“Alshamrani attempted to destroy both of the phones, even going so far as to disengage from the gunfight long enough to fire a bullet into one of the phones,” Barr said during the press briefing.

Barr added that the FBI uncovered the connection after bypassing security features on at least one of Alshamrani’s two iPhones, without any assistance from Apple.

“The problem was the phones were locked and the FBI did not have the passwords, so they needed help to get in,” said Barr. “We asked Apple for assistance and the President asked Apple for assistance. Unfortunately, Apple would not help us unlock the phones. Apple had deliberately designed them specifically so that only the user, in this case, the terrorist, could gain access to their contents.”

The FBI discovered communication between Alshamrani and the al-Qaeda operative on Alshamrani’s phone, a U.S. official told the Associated Press.

At the time of the shooting, Alshamrani, who was killed by a sheriff’s deputy during the firefight, was taking part in flight training at Pensacola, where members of foreign militaries have long received training.

Law enforcement officials say Alshamrani was motivated by a jihadist ideology. They say he visited a New York City 9/11 memorial over Thanksgiving weekend 2019, and posted anti-American and anti-Israeli messages on social media just two hours before the shooting.

Attorney General Barr said in January the shooting was an “act of terrorism” and added that the shooter was motivated by “jihadist ideology.”

After the shooting, al-Qaeda’s branch in Yemen released a video accepting credit for the attack. In January, U.S. officials announced that they were sending home 21 Saudi military students after an investigation revealed that they shared jihadist or anti-American sentiments on social media pages or had “contact with child pornography.”