Mr. Trump and his advisers have argued inside the White House that doing more to bar people from other countries from coming into the United States, either for short-term visits or to live and work in the country for longer periods, could help limit the number of infected people who arrive from potential coronavirus hot spots around the world. And they argue that it could relieve pressure on the American health care system.

But Mr. Trump’s primary focus appears to be on protecting American workers as the virus ravages what had been a rapidly growing job market.

Even before the pandemic, the president and some of his most hard-line advisers had been eager to reduce legal immigration, arguing that Mr. Trump’s “America First” campaign pledge should be seen as protecting native-born Americans from having to compete with foreign workers.

Stephen Miller, the architect of the president’s immigration agenda, has pushed repeatedly for regulations and executive actions that would limit the immigration allowed each year, arguing that immigrants are a drain on American society, drive down wages and take jobs from native-born Americans.

And the president’s restrictionist allies on Capitol Hill quickly praised word of his actions. Senator Tom Cotton, Republican of Arkansas, said on Twitter: “22 million Americans have lost their jobs in the last month because of the China virus. Let’s help them get back to work before we import more foreigners to compete for their jobs.”

Immigrant rights groups angrily dispute the claim that immigration is bad for American workers, pointing to research that shows there is little connection between immigration and wages, and stressing the benefits of America’s immigrant culture. Charanya Krishnaswami, the advocacy director for the Americas at Amnesty International USA, responded to the president’s tweet with one of her own.

“When you’re a xenophobe, bans on migration are the only tired, failed, hateful solution you can think of,” Ms. Krishnaswami wrote. “Suspending immigration won’t make the US — which currently leads among COVID cases worldwide — safe. Our policies need to be grounded in public health, not bigotry.”