The Saudi gunman who killed three people at the Pensacola naval base had apparently gone on Twitter soon before the shooting to blast US support of Israel and accuse America of being anti-Muslim, a US 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 criticising the US under a user handle similar to his name, but federal law enforcement officials are investigating whether he wrote the words or just posted them, said the official, who was not authorised 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 called for better vetting of foreigners allowed into the US for training on American bases. He said the gunman had a social media trail and a “deep-seated hatred of the United States.” “My view is that for us to be bringing in these foreign nationals, you have to take precautions to protect the country,” the governor said. He added: “To have them take out of three of our sailors, to me that’s unacceptable, and I think that could have been prevented.” Earlier in the week of the shooting, Alshamrani hosted a dinner party where he and three others watched videos of mass shootings, another US official told the AP on Saturday. Alshamrani used a Glock 9mm 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 US 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 US 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. Shooting suspect filmed Saudi airman opening fire at Pensacola Navy base 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 radicalised.” O’Brien said he did not see evidence so far of a “broader plot.” The US has long had a robust training program for Saudis, providing assistance in the US 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 US going through military training. Foreigners allowed into the US for military training are subject to background checks to weed out security risks.