A shooting at a U.S. military base in Florida by a Saudi military student has prompted questions about how the U.S. government scrutinizes candidates for military exchange programs as the Pentagon highlighted the layers of screening already in place.

Officials say the gunman opened fire at Naval Air Station Pensacola on Friday, killing three people and injuring several others before he was shot and killed by authorities.

After the attack, Sen. Rick Scott (R.-Fla.) called for a “full review” of U.S. military programs that train foreign service members on American soil.

Scott said in a statement that he was “extremely concerned by the reports that this shooter was a foreign national training on a U.S. military base” and that the United States must remain vigilant against such attacks.

“There is no reason we should be providing state-of-the-art military training to people who wish us harm,” he said. “And most importantly, there is no reason to risk the safety and security of our American men and women in uniform. If not for the bravery displayed by the military personnel on the ground and local law enforcement, today’s tragedy could have been much worse.”

Sen. Marco Rubio (R.-Fla.), meanwhile, indicated in tweets Friday evening that he has questions about possible gaps in the “extensive security & suitability vetting” that is required for foreign officers who undergo training in the United States.

“Today’s tragic attack has exposed some serious flaw in that process which must be discovered & corrected,” Rubio tweeted.

Rep. Matt Gaetz (R.-Fla.), whose district includes Pensacola, said in a video released Friday that he will be working with the Defense and State departments to ensure that the United States has “extreme vetting” for foreign service members who train in the United States. The shooting, he said, “demonstrates a serious failure in the vetting process and in the way in which we invite these people to our community.”

But Gaetz acknowledged there are benefits to the training, including ensuring that military partners abroad are familiar with American systems and officers.

“Saudi Arabia has long sent people to northwest Florida for this purpose,” he said. “Many of them have gone on to work right alongside our warfighters in the Middle East and around the world.”

Sen. Jack Reed (R.I.), the ranking Democrat on the Senate Armed Services Committee, called for a review of on-base weapons policies. “At some point, President Trump and members of Congress must summon the political courage and take meaningful action to keep guns out of the hands of those who pose a threat to others,” Reed said in a statement in response to the shooting.

Defense Secretary Mark Esper offered his condolences in a statement released Friday evening and said he is “considering several steps to secure the safety of our military installations and and the safety of our service members and their families.”

The Pentagon has long welcomed foreign military officers from partner nations to train in the United States, wagering that it bolsters global security and builds relationships that prove helpful later.

“We are committed to strengthening defense relationships and building partner capacity and capability while carrying out our mutual security interests and U.S. foreign policy,” said a catalogue released by the Navy this year that detailed training for foreign military officers in the United States, including at Pensacola.

As of Friday, 5,181 foreign students from 153 countries were in the United States for military training, including 852 Saudis, said Chris Garver, a Pentagon spokesman. That training ranges from basic courses in helicopter maintenance to five-week courses in advanced leadership for senior Saudi naval officers, according to the catalogue.

Other nations that have sent military students to Pensacola include Kenya, Nigeria, Togo, India, Oman, Tunisia, Fiji, Haiti, Indonesia, Malaysia, Mauritius and the Philippines, according to a State Department report on foreign military training.

The shooter at Pensacola — identified by U.S. and Saudi government officials as Ahmed Mohammed al-Shamrani — appeared to have a similar background.

While the Pentagon did not identify the suspected gunman by name, Garver said the Saudi involved began training in the United States in August 2017 and was scheduled to finish in August 2020. His training included English language classes, a basic aviation course and initial pilot training.

The motive in the shooting and other details are not yet clear. But if U.S. policy was followed, U.S. Embassy personnel in Saudi Arabia conducted a screening for evidence of drug trafficking, terrorist activity, corruption or other criminal conduct. Individuals who do not pass the screening are barred from receiving travel orders needed to enter the United States, Garver said.

The Pentagon’s Security Assistance Management Manual that lays out guidelines for security assistance to foreign countries states that if a potential student’s “reputable character or physical condition cannot be validated, the individual must not be approved for training.”

Security incidents involving foreigners in the United States for military training have been rare, though some have occurred in the past.

The U.S. military has tracked scores of cases of Afghan service members who came to the United States for training and then deserted, U.S. military officials have said.

This year, the Pentagon disbanded a program in Fort Worth that trained Afghan pilots to fly the C-208 propeller plane as an attack aircraft “due to the number of trainees who were going absent without leave (AWOL),” according to an April report by the Special Inspector General for Afghanistan Reconstruction.

A similar program to train Afghans to fly the A-29 attack plane at Moody Air Force Base in Georgia has faced similar problems and is expected to conclude in 2020.