The shooting of two National Guard members the day before in Washington hung over President Trump’s Thanksgiving events at Mar-a-Lago, where he held a call with members of the military to thank them for their service on the holiday.

At the beginning of the call, he revealed that one of the Guard members, Army Specialist Sarah Beckstrom, had died.

“It’s just happened,” Mr. Trump said. “She was savagely attacked. She’s dead. Not with us.” The other victim, he said, was “fighting for his life.”

Later, a White House official said that the president had spoken with the family of the slain National Guard member.

After authorities identified the suspect as an Afghan refugee, members of the Trump administration and other Republicans reacted furiously. They cited it as evidence of what they had been warning about immigration, condemned the Biden administration’s refugee policies and said it justified a further crackdown on immigration.

Joseph Edlow, director of U.S. Citizenship and Immigration Services, announced on Thursday that in the wake of the attack, he was implementing new policy guidance on vetting prospective immigrants from 19 high-risk countries using “country-specific factors as significant negative factors.” The change in guidance had been under consideration before the shooting.

In his statement, Mr. Edlow blamed the Biden administration for “dismantling basic vetting and screening standards, prioritizing the rapid resettlement of aliens from high-risk countries over the safety of American citizens.”

The fierce rhetoric was echoed across the administration.

“I remember back in 2021 criticizing the Biden policy of opening the floodgate to unvetted Afghan refugees,” Vice President JD Vance wrote on social media on Wednesday. “Friends sent me messages calling me a racist. It was a clarifying moment. They shouldn’t have been in our country.”

At Mar-a-Lago on Thursday, Mr. Trump produced a photograph showing Afghans rushing onto a plane leaving their country as its government collapsed in 2021.

“This is what we had under the Biden administration,” Mr. Trump said, holding up the photograph of the frenzied evacuation scene for the news cameras in the room. “That whole thing should have never, ever happened.”

When a reporter pointed out that, according to officials, the suspect had worked with the C.I.A. and therefore had been vetted, Mr. Trump said, “He went cuckoo, I mean, he went nuts.”

Mr. Trump said his administration was “looking at” the possibility of deporting the family of the 29-year-old suspect, who lived in Bellingham, Wash., with a wife and several children.

Asked whether he was blaming all Afghans for the crime of one man, Mr. Trump said, “No, but there’s a lot of problems with Afghans.”

Echoing largely unfounded claims that he has made about immigrants from other countries, he said that “many of these people are criminals, many of these people are people that shouldn’t be here.”

Jumping to the subject of Somali refugees in Minnesota, he said that population was “taking over” that state, bringing gang violence.

Asked what Somalis had to do with the Afghan suspect, Mr. Trump replied: “Ah, nothing, but Somalians have caused a lot of trouble, they’re ripping us off a lot of money.” This led him to criticize Representative Ilhan Omar, Democrat of Minnesota, who came to the United States as a refugee from Somalia.

“We’re not taking their people anymore,” he said.

In a pair of lengthy social media posts just before midnight on Thursday, Mr. Trump said he would “permanently pause migration from all Third World Countries” and denaturalize migrants “who undermine domestic tranquillity.”

He did not provide details about how he would go about it, or provide specific evidence about problems created by immigrants. Under federal law, U.S. citizens can generally only be denaturalized if they are found to have concealed material facts about their background in gaining citizenship or to have misrepresented themselves in the process.

In a memo in June, the Justice Department said the administration was prioritizing efforts to “revoke the citizenship of individuals who engaged in the commission of war crimes, extrajudicial killings, or other serious human rights abuses; to remove naturalized criminals, gang members, or, indeed, any individuals convicted of crimes who pose an ongoing threat to the United States; and to prevent convicted terrorists from returning to U.S. soil or traveling internationally on a U.S. passport.”

He again referred to gangs from Somalia in Minnesota, questioning Gov. Tim Walz of Minnesota’s intelligence and his ability to handle the supposed threat, and mocked Ms. Omar for her use of a hijab.

Similar language has exploded on the right since Wednesday’s shooting, including from Senator Tommy Tuberville, Republican of Alabama, who called for Muslim potential immigrants to be banned and for the deportation of anyone deemed an “Islamist.”

In the case of the shooting suspect, he received asylum from the U.S. government in April, according to three people with knowledge of the case who were not authorized to speak publicly. A reporter at Mar-a-Lago on Thursday asked Mr. Trump about this as well.

“When it comes to asylum, when they’re flown in, it’s very hard to get them out,” Mr. Trump answered. “No matter how you want to do it, it’s very hard to get them out, but we’re going to be getting them all out now.”

Hamed Aleaziz contributed reporting.