The Trump administration has published new visa rules aimed at restricting pregnant women travelling to the United States to give birth so their children can have US citizenship, a practice known as “birth tourism”.

Applicants will be denied tourist visas if they are determined by consular officers to be coming to the US primarily to give birth, according to the rules in the Federal Register. They will have to prove they are traveling to the US because they have a medical need and not just because they want to give birth here.

Children who are born in the US are automatically granted American citizenship, a right guaranteed by the 14th amendment of the constitution.

The practice of traveling to the US to give birth is fundamentally legal, although there are scattered cases of authorities arresting operators of birth tourism agencies for visa fraud or tax evasion. And women are often honest about their intentions when applying for visas and even show signed contracts with doctors and hospitals.

Those with medical needs will be treated like other foreigners coming to the US for medical treatment and must prove they have the money to pay for it – including transportation and living expenses.

“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,” the White House press secretary, Stephanie Grisham, said in a statement.

“It will also defend American taxpayers from having their hard-earned dollars siphoned away to finance the direct and downstream costs associated with birth tourism. The integrity of American citizenship must be protected.”

The state department “does not believe that visiting the United States for the primary purpose of obtaining US citizenship for a child, by giving birth in the United States – an activity commonly referred to as ‘birth tourism’ – is a legitimate activity for pleasure or of a recreational nature,” according to the new rules, which take effect on Friday.

While the new rules deal specifically with birth tourism, the Trump administration also has turned away pregnant women coming over the US-Mexico border as part of a broader immigration crackdown. Those women were initially part of a “vulnerable” group that included others like small children who were allowed in, while tens of thousands of other asylum seekers have been returned to Mexico to wait out their cases.

Donald Trump’s administration has been restricting all forms of immigration, but recently, Trump has been particularly vocal in his criticism of the issue of birthright citizenship. The Republican president has railed against the practice and threatened to end it, but scholars and members of his administration have said it’s not so easy to do.

Regulating tourist visas for pregnant women is one way to get at the issue, but it raises questions about how officers would determine whether a woman is pregnant to begin with and whether a woman could get turned away by border officers who suspect she may be just by looking at her.

And critics of the new policy say it could put pregnant women at risk.

Consular officers do not have the right to ask during visa interviews whether a woman is pregnant or intends to become so. But they would still have to determine whether a visa applicant would be coming to the US primarily to give birth.

Birth tourism is a lucrative business in the US and abroad. Companies take out advertisements and charge up to $80,000 to facilitate the practice, offering hotel rooms and medical care. Many of the women travel from Russia and China to give birth in the US.

The US has been cracking down on the practice since before Trump took office.

“An entire ‘birth tourism’ industry has evolved to assist pregnant women from other countries to come to the United States to obtain US citizenship for their children by giving birth in the United States, and thereby entitle their children to the benefits of US citizenship,” according to the state department rules.

There are no figures on how many foreign women travel to the US specifically to give birth. The Center for Immigration Studies, a group that advocates for stricter immigration laws, estimated that in 2012 about 36,000 foreign-born women gave birth in the US and then left the country.

“This rule will help eliminate the criminal activity associated with the birth tourism industry,” according to the rules. “The recent federal indictments describe birth tourism schemes in which foreign nationals applied for visitor visas to come to the United States and lied to consular officers about the duration of their trips, where they would stay, and their purpose of travel.”