The Trump administration has unveiled its latest national security measure—a crackdown on pregnant travelers—leaving both immigration and women’s rights attorneys shaking their heads.

New State Department rules, slated to take effect Friday, allow consular officials to deny tourist visas to anyone they believe may give birth on their trip to the United States. The administration says this is to stop pregnant women from entering the country solely to seek birthright citizenship for their children. But attorneys say it is just another license to discriminate.

“What this measure seems to be doing is creating another basis for discriminating against women in their ability to come to the United States of America,” said Lynn Paltrow, executive director of National Advocates for Pregnant Women. “It portrays women and people with the capacity for pregnancy as a danger to the United States of America.”

Until now, traveling to the U.S. to give birth has been entirely legal, as long as women did not lie about their intentions on their visa application. The lack of restrictions helped fuel a lucrative “birth tourism” business, in which U.S.-based brokers—including several operating out of Trump properties—charged women tens of thousands of dollars for lodging during their pregnancy and birth.

Trump, however, has long railed against the concept of birthright citizenship, calling it a “magnet for illegal immigration” and falsely claiming that the U.S. is the only country in the world that allows it. He even proposed eliminating birthright citizenship outright via executive order—a proposal experts dismissed as blatantly unconstitutional.

The State Department said Thursday that the new rules are meant to close an immigration “loophole” that threatens national security. But officials were unable to name a single instance in which so-called “birth tourism” had created a national security threat. They also could not provide the exact number of tourists who give birth in the U.S. each year, putting the number somewhere in the thousands. Approximately 4 million people give birth in the U.S. annually.

The ACLU slammed the new rules, calling on the administration to “reverse course.”

“This is the same administration that admitted to tracking the periods of migrant teens and ramping up its detention of pregnant immigrants,” said Ria Tabacco Mar, director of the ACLU’s Women’s Rights Project. “We have real questions, but we know this: This new regulation is rooted in misogyny, xenophobia, and racism.”

Experts also questioned exactly how the new rules would be enforced. According to the State Department rules, consular officers will be required to question any woman for whom they have a “specific, articulable reason” to believe she is traveling for the primary purpose of giving birth. But they declined to say how exactly an officer would determine this, saying it could become apparent in an interview, in an application form, or as part of “information that comes to a consular officer.”

Jeffrey Gorsky, an attorney who previously worked in the State Department’s visa office, said it would be rare for a woman to wait until she was visibly pregnant to apply for a visa. In fact, many travelers apply for multiple-entry visas that are good for at least 10 years. “Are they going to restrict visas for young women who are married under the presumption they could be coming to the U.S. to give birth?” Gorsky asked.

Paltrow said this system would incentivize officers to deny visas to any woman who could be pregnant, for fear they would be accused of not doing their jobs. “They’re going to see virtually every woman who wants to come into the country as possibly pregnant and someone they should keep out,” she said. “Because there’s no way you can tell just by looking.”

The rule allows exceptions for women who plan to give birth in the U.S. for legitimate medical reasons or who have some other reason for coming to the country late in their pregnancy. (An example listed in the text of the rules is a pregnant woman who is coming to visit her terminally ill mother.) Women who enter the country for medical reasons related to their pregnancy are required to demonstrate that they can pay for the services in full.

The issue of “birth tourism” has received increased media attention in recent years, as Trump lashed out against immigrants he claimed were cheating their way into the country. Women from China and Russia have paid anywhere from $50,000 to $100,000 to have their children in sunny locales like Southern California or Florida.

A previous Daily Beast investigation found several Miami-based birth tourism firms advertising rentals in Trump-owned properties. One such company advertised lodging in the local Trump Towers, with a gold-tiled bathtub and chauffeured Cadillac Escalade or Mercedes Benz. Others offered a Trump Royale penthouse apartment, starting at $7,000 a month.

“I was looking particularly for Trump Towers,” said one expectant mother who traveled from Russia to Miami. “[Now] in the evenings, I have a great view because you have the bay, and the buildings aglow. The building is great. No regrets.”