This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

The Saudi gunman who killed three people at the Pensacola naval base had apparently gone on Twitter shortly before the shooting to blast U.S. support of Israel and accuse America of being anti-Muslim, a U.S. official said Sunday as the FBI confirmed it is operating on the assumption the attack was an act of terrorism.

Investigators are also trying to establish whether the killer, 2nd Lt. Mohammed Alshamrani, 21, of the Royal Saudi Air Force, acted alone or was part of a larger plot.

Alshamrani, who was killed by a sheriff’s deputy during the rampage at a classroom building Friday, was undergoing flight training at Pensacola, where members of foreign militaries routinely receive instruction.

“We are, as we do in most active-shooter investigations, work with the presumption that this was an act of terrorism,” said Rachel J. Rojas, the special agent in charge of the FBI’s office in Jacksonville.

Authorities believe the gunman made social media posts criticizing the U.S. under a user handle similar to his name, but federal law enforcement officials are investigating whether he authored the words or just posted them, said the official, who was not authorized to discuss the matter publicly and spoke to The Associated Press on condition of anonymity.

Also, investigators believe the gunman visited New York City, including Rockefeller Center, days before the shooting and are working to determine the purpose of the trip, the official said.

All foreign students at the Pensacola base have been accounted for, no arrests have been made, and the community is under no immediate threat, Rojas said at a news conference. A Saudi commanding officer has ordered all students from the country to remain at one location at the base, authorities said.

“There are a number of Saudi students who are close to the shooter and continue to cooperate in this investigation,” Rojas said. “The Saudi government has pledged to fully cooperate with our investigation.”

Florida Gov. Ron DeSantis said the investigation was proceeding under “the presumption that this was an act of terrorism”and he called for better vetting of foreigners allowed into the U.S. for training on American bases.

Speaking at a news conference Sunday afternoon, DeSantis also said the gunman had a social media trail and a “deep-seated hatred of the United States.”

He said he thought such an attack could have been prevented with better vetting.

“You have to take precautions” to protect the nation, DeSantis said.

“To have this individual be able to take out three of our sailors, to me that’s unacceptable,” the governor added.

Earlier in the week of the shooting, Alshamrani hosted a dinner party where he and three others watched videos of mass shootings, another U.S. official told the AP on Saturday.

Alshamrani used a Glock 9 mm weapon that had been purchased legally in Florida, Rojas said. DeSantis questioned whether foreigners should continue to be allowed under federal law to buy guns in the U.S. and called it a “federal loophole.”

Republican DeSantis said he supports that the Second Amendment but that it “does not apply to Saudi Arabians.”

Family members and others identified the three dead as Joshua Kaleb Watson, a 23-year-old graduate of the U.S. Naval Academy; Airman Mohammed Sameh Haitham, 19, of St. Petersburg, Florida, who joined the Navy after graduating from high school last year; and Airman Apprentice Cameron Scott Walters, 21, of Richmond Hill, Georgia.

The official who spoke Saturday said one of the three students who attended the dinner party hosted by the attacker recorded video outside the classroom building while the shooting was taking place. Two other Saudi students watched from a car, the official said.

In a statement, the FBI confirmed Sunday that it had obtained base surveillance videos as well as cellphone footage taken by a bystander outside the building, and had also interviewed that person.

Rojas would not directly answer when asked whether other students knew about the attack beforehand or whether there was anything “nefarious” about the making of the video. She said that a lot of information needs to be confirmed by investigators and that she did not want to contribute to “misinformation” circulating about the case.

Rojas said federal authorities are focused on questioning the gunman’s friends, classmates and other associates. “Our main goal is to confirm if he acted alone or was he part of a larger network,” she said.

President Donald Trump’s national security adviser, Robert O’Brien, said on CBS’ “”Face the Nation” that the shooting looked like “terrorism or akin to terrorism.” But he cautioned that the FBI was still investigating.

“Look, to me it appears to be a terrorist attack,” he said. “I don’t want prejudge the investigation, but it appears that this may be someone that was radicalized.” O’Brien said he did not see evidence so far of a “broader plot.”

The U.S. has long had a robust training program for Saudis, providing assistance in the U.S. and in the kingdom. More than 850 Saudis are in the United States for various training activities. They are among more than 5,000 foreign students from 153 countries in the U.S. going through military training.

Foreigners allowed into the U.S. for military training are subject to background checks to weed out security risks.

“This has been done for many decades,” Trump said on Saturday. “I guess we’re going to have to look into the whole procedure. We’ll start that immediately.”

Saudi Arabia’s government so far has not commented on a possible motive for the shooting, nor offered any information about the promised investigation.

___

Balsamo reported from Washington. Associated Press reporters Lolita Baldor, Ben Fox, and Robert Burns in Washington; Jon Gambrell in Dubai; Bobby Caina Calvan in Tallahassee, Florida; and Tamara Lush in Tampa, Florida, contributed to this report.