Attorney General William Barr announced Monday that the December mass shooting by a Saudi national that left three American sailors dead in Pensacola, Florida, was an act of terrorism.

Mohammed Saeed Alshamrani, a second lieutenant in the Royal Saudi Air Force, allegedly shot and killed three U.S. Navy sailors — Ensign Joshua Kaleb Watson, 23, Airman Mohammed Haitham, 19, and Airman Apprentice Cameron Walters, 21 — and wounded at least eight others at the Naval Air Station Pensacola. Haitham and Walters received posthumous promotions, and acting Secretary of the Navy Thomas Modly praised them for displaying “the finest warrior ethos and quick decision-making that undoubtedly saved many lives.”

Alshamrani was shot and killed by responding deputies from the Escambia County Sheriff's Office. The FBI had quickly announced its investigation was treating the mass shooting as a possible act of terrorism.

Barr said that “the evidence shows that the shooter was motivated by jihadist ideology.”

On Sept. 11, the Saudi national posted on social media that “the countdown has begun,” and over his Thanksgiving break, he visited the 9/11 memorial in New York City.

Barr said early reports about other Saudi cadets somehow aiding in the attack were untrue. “There is no evidence of assistance or preknowledge of the attack by the Saudis,” Barr said.

“The Kingdom of Saudi Arabia gave complete and total support to our counterterrorism investigation,” Barr said. “They ordered all Saudi trainees to fully cooperate.” Barr said that during the investigation, “we did learn of derogatory material possessed by 21 Saudi trainees,” including 17 people who had shared “jihadi or anti-American content” and 15 people, including some of the 17, who had contact with child pornography.

“None of them would, in a normal course, result in federal prosecution,” Barr said. Barr said that, after consultation with the Saudi government, “the 21 cadets have been disenrolled from their training program and will be returning to Saudi Arabia today” and that Saudi Arabia will review them under its code of military justice.

The Pentagon had said Alshamrani began his U.S.-based courses in English, aviation, and basic pilot training in 2017 and was supposed to finish this August. He was one of more than 850 Saudi nationals in the United States for military training as part of a security agreement with the Kingdom of Saudi Arabia. Overall, there were more than 5,100 foreign students from 153 different countries in the U.S. as part of the specialized military training program.

Last spring, Alshamrani filed a complaint against one of his instructors, who jokingly referred to him by the nickname “Porn Stache.” Alshamrani showed mass shooting videos during a dinner party the week of the shooting, and a Twitter account believed to belong to Alshamrani expressed extremist and stridently anti-American views, including a tweet which echoed Osama bin Laden: “The security is a shared destiny ... You will not be safe until we live it as reality in [Palestine] and American troops get out of our land.”

In the wake of the shooting, President Trump tweeted that “King Salman of Saudi Arabia just called to express his sincere condolences and give his sympathies to the families and friends of the warriors who were killed and wounded in the attack” and “the Saudi people are greatly angered by the barbaric actions of the shooter.”

Sen. Rick Scott, a Florida Republican, called for “a full review of the US military programs to train foreign nationals on American soil” in the wake of the shooting, saying, “we shouldn't be providing military training to people who wish us harm.” And Florida Gov. Ron DeSantis, also a Republican, said, “the government of Saudi Arabia needs to make things better for these victims” and “they’re going to owe a debt here.”

The massive Pensacola air base houses thousands of sailors and airmen and, in addition to the Naval Education and Training Command as well as the Naval Aerospace Medical Institute, is the home of the Navy's Flight Demonstration Squadron, the Blue Angels.