Some pregnant foreign women pay as much as $100,000 to be ferried into the U.S. on a visitor’s visa, arriving in time to give birth on American soil and instantly make their baby a citizen.

The Trump administration on Thursday announced a policy designed to put an end to that kind of “birth tourism.”

Under rules taking effect Friday, State Department consular officials will now be able to refuse to grant short-term tourism or business visas to women they believe are attempting to travel solely for the purpose of having their womb on U.S. soil at the time they deliver.

The department called birth tourism “a threat to the security of the United States,” and the White House said the very integrity of U.S. citizenship is at stake if people are able to trick their way into obtaining legal status and its benefits for their newborns.

“The birth tourism industry threatens to overburden valuable hospital resources and is rife with criminal activity,” said presidential press secretary Stephanie Grisham. “Closing this glaring immigration loophole will combat these endemic abuses and ultimately protect the United States from the national security risks created by this practice.”

Only women believed to be traveling specifically to give birth on tourist visas will be denied.

Women seeking visas for other purposes but who are still likely to give birth will continue to be eligible for approval, Carl C. Risch, assistant secretary at the State Department, said in the government’s filing in the Federal Register. Women coming to the U.S. for specialized medical care for their pregnancies will be able to argue the merits of their cases, he said.

But the administration said it is important to establish the principle.

Mr. Risch said the rules need to take effect immediately, without public hearings or comment, because of the national security implications.

Under current law, there is nothing specifically illegal in asking for a visa to come to the U.S. to give birth. Indeed, Mr. Risch said embassies and consulates report a growing number of people who list giving birth as their stated reason for asking for a visa.

“Permitting short-term visitors with no demonstrable ties to the United States to obtain visas to travel to the United States primarily to obtain U.S. citizenship for a child creates a potential long-term vulnerability for national security,” he wrote. “Foreign governments or entities, including entities of concern to the United States, may seek to benefit from birth tourism for purposes that would threaten the security of the United States.”

Jessica Vaughan, a former State Department officer and now policy studies director at the Center for Immigration Studies, said the new rule is a first step in fixing a big problem.

“It puts all potential birth tourists on notice that they are being scrutinized,” she said.

But she said border officers should be empowered along with State Department employees. Under the U.S. system, the State Department approved the visas, but it’s Homeland Security’s Customs and Border Protection officers who have final say on admitting people at ports of entry.

Immigrant rights activists complained about the rule, suggesting it may lead to overreach by officers who will strain to figure out who should be barred.

“It is absurd that the Trump administration is turning embassy employees into reproductive policemen. Women will have to conceal their pregnancies just to get a tourist visa to visit the United States,” said Kerri Talbot, director of federal advocacy at the Immigration Hub.

CIS, in a report last month, calculated that about 33,000 women on short-term business or tourism passes, known as B visas, give birth in the U.S. each year.

Another 39,000 foreign women on other visas, such as student or work visas, also give birth in the U.S. They would not be subject to the new rule. Neither would the hundreds of thousands of births to illegal immigrant women.

Under current law, almost anyone born on American soil is automatically deemed a citizen. The policy is dubbed “birthright citizenship.”

President Trump has talked about attempting to change that policy through executive action but has not followed through.

Legal analysts doubt he has the power to change it, though there’s a larger debate over whether Congress could change it or whether it would require amending the Constitution’s 14th Amendment.

Ms. Vaughan said that would be the most permanent solution to birth tourism.

In the meantime, authorities have begun to bring cases where they can, including charges last year against 19 people accused of running birth tourism operations in Southern California, aimed at wealthy Chinese women.

They paid up to $100,000, were coached on how to get visas and how to conceal their pregnancies from consular officials and border officers, and then kept in apartments for the final months of their pregnancies so they could deliver on U.S. soil and trigger the automatic citizenship policy.

One of the 19 pleaded guilty in September to her role. Her operation, You Win USA Vacation Services Corp., was responsible for 500 birth tourists, and she collected $3 million in fees over two years.

The women who gave birth were not sanctioned. Immigration officials said it’s not against the law. As for the children, citizenship can’t be revoked.

In addition to China, Russia is another major source of birth tourism.

News outlets have reported that Mr. Trump’s hotel properties are frequent destinations for Russian birth tourists.