The investigation into a deadly shooting at a Pensacola military base resulted in the expulsion of 21 Saudi nationals who were military students over jihadi literature and child porn found on their computers.

Attorney General Bill Barr told reporters in a media briefing on Monday that the military students were found to have posted jihadist messages on social media, while others had contact with child pornography.

Three U.S. sailors were killed in the December mass attack and another eight Americans were wounded. Barr called the attack "an act of terrorism."

The FBI found that the assailant had posted messages ahead of the attack that could have served as a warning. One message read "The countdown has begun," on the anniversary of the 9/11 terror attacks.

"He also posted other anti-American, anti-Israeli, and jihadi messages on social media, and did so two hours before his attack at the naval base," said Barr.

Investigators say he had been planning the mass attack for months. They did not find that any other students had prior knowledge of the attack, or that they aided it in any manner.

The FBI is seeking help from Apple to access information on the attacker's iPhone devices, which he attempted to disable during the attack.

Barr told reporters that the vetting process would be improved to prevent future attacks, but he added that the Saudi Arabian training was important to U.S. foreign policy.

Here's a news report about the expulsions: