The man who opened fire at the Pensacola naval base Friday was a Saudi national who was in the country for flight training, and authorities are investigating whether the deadly shooting is terror-related, reports said.

The unidentified gunman killed at least three people at Naval Air Station Pensacola and injured several others in a classroom at the Florida flight training base before being shot dead by sheriff’s deputies.

He was a Saudi national and aviation student, the Associated Press reported, citing a US official. The station is attended by military from around the globe.

At a press conference Friday morning, local authorities said gunfire broke out inside a classroom at the base just before 7 a.m. Two deputies with the Escambia County Sheriff’s Department exchanged gunfire with the man, who was shot dead.

Seven people were hurt in the shooting, including the two deputies, who suffered non-life-threatening injuries.

Jeff Bergosh, a facilities manager at the base, told MSNBC that more than 10,000 workers go to NAS Pensacola each day.

President Trump said he’s received a full briefing on the “tragic shooting” and also spoke with Florida Gov. Ron DeSantis.

“My thoughts and prayers are with the victims and their families during this difficult time,” Trump tweeted. “We are continuing to monitor the situation as the investigation is ongoing.”

The fatal shooting was the second at a US military facility this week. On Wednesday, a US sailor shot three civilian employees before turning the gun on himself at the Pearl Harbor Naval Shipyard in Hawaii. Two of the victims died.