WASHINGTON (NEXSTAR) – The latest details on the investigation into last month’s deadly shooting at a Pensacola Naval base were revealed on Monday.

“This was an act of terrorism,” United States Attorney General William Barr said.

The Department of Justice and the FBI said the shooter posted anti-American, anti-Israeli and Jihadi messages on social media just hours before the attack.

They said the 21-year-old shooter acted alone when he killed three American service members and injured eight others on Dec. 6. He was a member of the Saudi military taking part in a U.S. training program.

“The Royal Saudi Air Force, which flies American-made aircraft, is an important military partner and has long had a training relationship with the United States,” Barr said.

During the investigation, Barr said 21 other Saudi trainees were found to have made derogatory posts about the U.S. on social media. Some also possessed child pornography.

All 21 are now removed from the training program and returning to their home country.

Barr said the next step in the investigation will be unlocking the shooter’s cell phone to examine its contents. But that is proving to be a challenge.

“So far, Apple has not given any substantive assistance,” Barr said.

He said the shooter deliberately damaged his iPhones during the attack. The FBI fixed the phones but FBI Deputy Director David Bowdich said so far, they can’t unlock them without Apple’s help.

“Even with a court order, to date, we cannot access the contents of the two phones,” Bowdich added.

Apple has not responded to our request for comment.