The Saudi officer, who shot dead three sailors at Naval Air Station Pensacola in Florida on Friday, had purchased the gun legally.
Mohammed Alshamrani bought the weapon from a gun store earlier this year, CNN reported citing a source. He obtained a hunting license that allows a non-immigrant on a non-immigrant visa to purchase a gun.
Alshamrani had opened fire in a classroom and killed three people and injured eight others. He was later gunned down by security forces.
The motivation for Alshamrani to open fire in a classroom has not been cleared yet. The 21-year-old did not have any ties with any terrorist groups.
Escambia County Sheriff David Morgan told CNN that the FBI had secured the areas on the base where the shooter was staying and they had recovered his laptop and cell phone.
A senior administration official told CNN that investigators found some concerning statements and online materials but noted that it was still early in the investigation.
When asked about the gunman's motive on Saturday, US Defense Secretary Mark Esper stressed the investigation was ongoing.
"I can't say it's terrorism at this time. I think we need to let the investigators of the FBI do their work," he said.
The FBI office in Jacksonville said it was "not aware of any credible threat toward the Pensacola community."
Meanwhile, six other Saudi nationals were detained for questioning near the scene of the shooting, which took place over two floors in a classroom on the base.
Three of the Saudis, who were detained, were seen filming the entire incident, the source said.However, the detainees confirmed the investigators that they just happened to be there at that time and wanted to capture the moment, the person added.
However, it is still not known whether the six Saudis detained were students in the classroom building, the person said. (ANI)