The shooting carried out by a student at the Naval Air Station Pensacola in December was an "act of terrorism," Attorney General William Barr said on Monday as officials released findings from the investigation.
The gunman, Royal Saudi Air Force 2nd Lt. Mohammed Saeed Alshamrani, was "motivated by jihadist ideology," according to Barr.
Alshamrani killed three U.S. sailors and wounded eight other Americans.
The U.S. is expelling 21 Saudi nationals living in America who also trained at U.S. military bases.
Officials said that the shooter had left a "trail of extremism" leading up to the attack.
"During the course of the investigation, we learned that the shooter posted a message on September 11,  stating, ‘the countdown has begun,'" Barr said. "During the Thanksgiving weekend, he then visited the 9/11 Memorial in New York City. He also posted other anti-American, anti-Israeli, and jihadi messages on social media, including two hours before his attack."
The other 21 Saudi nationals being expelled had "some kind of contact with child pornography" and had social media that had "some jihadi or anti-American" content, according to Barr.