Attorney General Bill Barr said the December 6 shootings by Royal Saudi Air Force 2nd Lieutenant Mohammed Saeed Alshamrani at the US Naval Air Station in Pensacola, Florida was an "act of terrorism."
"The evidence shows that the shooter was motivated by jihadist ideology," he told reporters.
There was no evidence that Alshamrani had colluded with others, although Barr said FBI investigators had been unable to unlock his two phones to determine whom he had contacted.
"We have asked Apple for their help in unlocking the shooter's iPhones. So far Apple has not given us any substantive assistance," Barr said.
The attorney general said 21 of Alshamrani's colleagues were being expelled from the base's flight school after the probe found many of them had jihadist material and child porn.
While the material didn't rise to the level of criminal prosecution, Barr said Riyadh had "determined that this material demonstrated conduct unbecoming an officer in the Saudi Royal Air Force and Royal Navy and the 21 cadets have been dis-enrolled from their training curriculum."
They were to return to Saudi Arabia later Monday, Barr said.
He added that the Saudi government had vowed to review each case under its code of military justice and criminal code.
"Further, the kingdom has assured us that, if we later decide to charge any of those being sent back to Saudi Arabia in connection with this counterterrorism investigation, it will return them for trial," Barr said.
Alshamrani gunned down three US sailors and wounded eight other people in a classroom block, in what Barr described as a premeditated assault, before police shot the gunman dead.
He had posted a message on social media on September 11, 2019 saying "the countdown has begun," in addition to several other anti-US, anti-Israel and jihadist messages, the investigation revealed.
The shooting threatened a decades-old military training program crucial to the US-Saudi relationship, which involves billions of dollars of military sales to the kingdom.
There are around 850 Saudis among the 5,000 foreign military personnel undergoing training in the United States.
Many, such as the Saudis in Pensacola, are trained in flying and maintenance of US-made military aircraft their countries are purchasing.
"These military partnerships are critically important to our country," Barr said.
Florida Senator Rick Scott, however, called for the suspension of the Saudi program for further review by the Department of Defense.
"This was an act of terrorism. Given the FBI's confirmation that a number of Saudi nationals engaged in troubling conduct, it's clear we need a hard reset," Scott tweeted.
"I'm calling on the Saudi gov't to recall all Saudi nationals training in the US until DOD can conduct a full review."
FBI Deputy Director David Bowdich said Alshamrani undertook the attack with a legally-bought semi-automatic pistol.
Normally non-residents are not permitted to buy firearms in the US, but Alshamrani exploited an exception that allows foreigners to buy guns for "hunting."
Bowditch said Alshamrani had 180 rounds of ammunition and multiple magazines, including a high-capacity magazine, which some states have sought to ban or tightly control in the wake of mass shootings.
Barr said the shooting "perfectly illustrates" why US law enforcement should be able to demand cellphone makers' cooperation to unlock phones in appropriate circumstances.
"We call on Apple and other technology companies to help us find a solution so that we can better protect the lives of Americans and prevent future attacks," he said.