The FBI now considers the shooting at a naval air base where three people were killed on Friday by a Saudi national as "an act of terrorism," according to the Associated Press.

The AP is also reporting that a U.S. official said Sunday that the Saudi gunman went on Twitter shortly before the shooting rampage to criticize American foreign policy toward Israel and accuse the United States of being "anti-Muslim."

American investigators are also working to establish whether the killer, who is a member of the Royal Saudi Air Force and was taking flight lessons in Pensacola, acted alone.

The U.S. has made its Pensacola base available to Saudi Arabia for several years as part of a military cooperation agreement between the two nations. The AP reported that more than 850 Saudis are among the 5,000 foreign students presently in the U.S. for military training activities.

Visited Rockefeller Centers days before the shooting

"We are, as we do in most active-shooter investigations, work with the presumption that this was an act of terrorism," said Rachel L. Rojas, the FBI agent in charge.

Authorities told the AP under the condition of anonymity that they believe the gunman made the social media posts that were critical of the U.S., but that it is unclear whether he wrote the words himself or just posted them.

U.S. authorities also believe the gunman visited several sites in New York City in the days leading up to the shooting, including Rockefeller Center. A federal law enforcement official said they are working to determine the purpose of his trip to New York.

The attack was filmed

U.S. Defense Secretary Mark Esper confirmed on "Fox News Sunday" that a Saudi national who knew the gunman recorded the shooting.

Authorities detained several of the shooter's friends after the killing. However, as Esper noted, it is unclear if the filming took place "before it began or was it something where they picked up their phones and filmed it once they saw it unfolding."

Meanwhile, on Saturday, President Donald Trump said that his administration would review the country's foreign military training protocols.

"This has been done for many decades," the president said. "I guess we're going to have to look into the whole procedure. We'll start that immediately."