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.

PENSACOLA, Fla. — At least one Saudi national filmed the deadly shooting at Naval Air Station Pensacola in Florida, US Defense Secretary Mark Esper confirmed on Sunday.

Friends of shooter Mohammed Alshamrani were detained after the killing of three US Navy sailors Friday. Esper said one or two of those friends recorded the attack.

Esper told “Fox News Sunday” that it was unclear whether they were “filming it before it began or was it something where they picked up their phones and filmed it once they saw it unfolding.”

Alshamrani used a Glock 9 mm pistol he bought “legally and lawfully,” said Rachel Rojas, FBI Special Agent in Charge, during a news conference.

A source earlier said Alshamrani bought it from a gun store this year. He obtained a hunting license, which allows a non-immigrant on a non-immigrant visa to purchase a gun, the source said.

Rojas said investigators “work with the presumption that this was a act of terrorism,” as they do in most similar cases. It allows “investigative techniques that can help” more quickly identify and eliminate potential threats. No credible threat to the community exists, Rojas said.

Investigators are trying to learn if any ideology contributed to the attack, Rojas said.

Alshamrani opened fire in a classroom building on Friday. He was killed after two deputies exchanged gunfire with him.

The FBI identified Alshamrani as the shooter. He was a 21-year-old second lieutenant in the Saudi Arabian air force and a student naval flight officer, according to an FBI spokesperson.

It does not appear he had ties to terrorist groups, two sources told CNN.

While the FBI is still determining whether to classify the violence as terrorism, White House National Security Adviser Robert O’Brien on Sunday said it “appears to be a terrorist attack.”

Escambia County Sheriff David Morgan told CNN’s Erin Burnett that the FBI had secured the areas on 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.

Motive still under investigation

Just minutes before authorities were first alerted to the shooting, a Twitter account aligning with Alshamrani’s name posted a message that raises the possibility the attack was inspired by al Qaeda and its founder, Osama bin Laden, CNN’s Nic Robertson and Paul Cruickshank said.

The first call alerting law enforcement of an incident at the Florida base came about 6:51 a.m., according to the Escambia County Sheriff’s Office.

Twelve minutes before, at 6:39 a.m., a Twitter account with the handle @M7MD_SHAMRANI posted a message addressed to the American people, declaring hate for Americans because of their “crimes” against Muslims.

CNN has been unable to verify the source of the tweet, which was previously reported on by SITE Intelligence Group. Law enforcement has not commented on it.

When asked about the account, Twitter spokeswoman Aly Pavela confirmed the account was suspended and said, “That’s all we have to share.”

The message repurposed words used by bin Laden and the American al Qaeda terrorist cleric Anwar al-Awlaki.

The shooter

Before Friday’s attack, Alshamrani watched mass shooting videos at a dinner party, The New York Times reported, citing a source with knowledge of the investigation but not authorized to speak publicly.

Alshamrani and a small group of Saudi nationals had just traveled to New York City over the Thanksgiving holiday, a law enforcement source told CNN.

They visited several museums and Rockefeller Center, where the Christmas tree lighting was taking place. Authorities don’t know why they traveled to the city, the source said.

The Saudis who accompanied Alshamrani are currently being interviewed by law enforcement and are being cooperative, the source added.

Earlier on Saturday, a US official told CNN that a number of Saudi nationals have been detained for questioning in connection with the shooting. The US official did not provide information about the connection between the shooter and the Saudis or the status of those who were detained.

President Donald Trump has said it is not known whether one person or a “number of people” were responsible for the attack.

“We will get to the bottom” of what happened, he said Saturday.

Alshamrani had been training at the Florida base for two years, a spokesperson for the assistant to the Secretary of Defense said.

Foreign students from “partner nations” have trained at the base to learn naval aviation for years, Commanding Officer of NAS Pensacola Capt. Tim Kinsella told reporters.

The victims

Three US Navy sailors were killed when they “didn’t run from danger” after the gunman opened fire at the base, US Navy officials said.

The sailors were Airman Mohammed Sameh Haitham, 19, of St. Petersburg, Florida; Airman Apprentice Cameron Scott Walters, 21, of Richmond Hill, Georgia; and Ensign Joshua Kaleb Watson, 23, from Coffee County, Alabama.

Watson had been training to become a military jet pilot when he died Friday after the gunman opened fire at a classroom building inside the base, his family said.

“My youngest brother gave his life for his country in a senseless shooting,” his brother, Adam Watson, wrote in a Facebook post. “We are beyond proud, but there is a hole in our hearts that can never be filled.”

Watson was a senior at the US Naval Academy last spring and was a four-year member of the school’s NCAA rifle team.

Sameh Haitham, the father of Airman Mohammed Sameh Haitham, told CNN his son “was an exceptional kid.”

The 19-year-old was an “all-star athlete” who took part in running and basketball before joining the Navy.

Several others were wounded, including two sheriff’s deputies and a Navy police officer, Escambia County Chief Deputy Chip Simmons said at a prayer vigil in Pensacola Saturday.

One deputy, who was shot in the arm, was treated and released on Friday. The other deputy had surgery on Friday and is expected to recover, Simmons said.

The Navy officer is “going to be fine,” Simmons added.

Details about the others who were wounded were not available.

Friday’s attack was the second shooting at a military base in three days. Last week, active duty US sailor Seaman Gabriel Romero killed two civilian employees and injured another before killing himself at Pearl Harbor Naval Shipyard in Hawaii. Investigators have not announced a motive for that shooting.