In luxury apartment complexes in Southern California and in grand, single-family homes in New York, “maternity hotels” are brimming with pregnant women and cooing newborn babies.

For wealthy foreign women, the facilities offer the promise of a comfortable, worry-free vacation complete with a major perk: a U.S. passport for their newborn.

One such maternity hotel in New York resembled a nursery: Newborn babies rested in a row of bassinets that lined the wall, according to an NBC News report that offered a look inside the facility.

Women who book rooms at these properties can expect to live in well-stocked apartment complexes or large suburban homes with laundry and catered food as part of the package. Once their babies are born in an American hospital, they are cared for by nurses while the mothers rest for at least a month. They can pass their time with shopping trips to luxury stores, trips to amusement parks or poolside at the “hotel” while attentive caretakers look after the infants, feeding, bathing and putting them to sleep on a regimented schedule, NBC News found.

The cost — $40,000 to $80,000 per stay — is worth it for the prospect that the visitor’s child will automatically be afforded the benefits given to U.S. citizens — and perhaps will have an easier time gaining legal residency in the United States when that child turns 21.

“For my baby, it’s a chance to, a step to two countries’ cultures . . . Chinese culture and American culture,” one woman told NBC.

There’s nothing illegal about foreign nationals giving birth in the United States. But traveling to the hotels requires the illegal practice of lying about the real reason for visiting the United States. Pregnant women purporting to be tourists enter the country in the latter stages of pregnancy, some overstaying their visas to recover in the comfort of the “maternity hotels.”

Birth tourism companies have flourished in recent years, according to federal officials — and many of them prefer hard-to-track cash to fuel their operations.

That money, federal officials allege, is being pocketed by a group of individuals who have skirted tax law, flouted immigration laws and helped their clients defraud U.S. hospitals of tens of thousands of dollars for each baby born.

On Tuesday, federal agencies, including Immigration and Customs Enforcement and the IRS, along with the Los Angeles Police Department, conducted a massive operation to raid more than 30 California locations operated by “birth tourism businesses.” Officials collected piles of evidence that will likely be used against some of the “maternity hotel” operators in future prosecutions.

The companies advertise their services online — and no foreign language skills are necessary to guess the subtext.

What are the benefits of a U.S. passport for a foreign national’s unborn child?

“Too many,” the Web site of StarBabyCare explains to prospective clients. “You can enjoy the free education from junior high school to public high school. . . . You can apply loans or grants which is only for the U.S. citizen. . . . You can receive your senior supplement benefits when you are living overseas. . . . To the parent, after the baby becomes an adult, he/she can petition the parents for a green card.”

According to court documents, an undercover investigator was told: “The baby will then have a birth certificate and ‘freedom.’ The baby will have a bright future having United States citizenship.”

Federal officials say that Chao Chen and Jie Zhu, the couple that operated the You Win baby tourism company, engaged in “sham marriages” to get green cards for themselves. In documents filed in federal court this week, officials said that the two “divorced” in 2012, but married U.S. citizens in Las Vegas months later.

Both applied for permanent residency, and an immigration officer reviewing the cases noted that the marriages were “suspect” based on the timing.

Such companies have openly encouraged women willing to pay for the service to commit visa fraud as well. They were counseled not to tell customs and immigration officials that they were pregnant, to wear loose clothes and to avoid traveling to the United States while looking visibly pregnant.

“U.S. might refuse entry due to the belly is too big,” StarBabyCare’s Web site informed potential customers. “Therefore the size of the belly is quite important to determine when you should arrive in Los Angeles.”

According to court documents, birth tourists were told to avoid traveling directly to Los Angeles International Airport from overseas, to avoid raising suspicion. They might even consider studying U.S. culture and booking recreational visits in order to make their travel seem more legitimate, the company advised. Alternate arrival ports such as Hawaii or Las Vegas were preferable.

You Win paid more than $60,000 a year to rent Southern California apartments that housed the women, according to court documents. Federal officials believe that StarBabyCare operated a “maternity hotel” from at least 10 units at one complex.

As more attention has been trained on the practice in recent years, the outrage has — predictably — followed.

Los Angeles County officials have cited the “hotels” for illegally operating business in residential homes in 2013. Angry neighbors at a Chino Hills “hotel” picketed as the report became public. Among its findings: The 17-bedroom, 17-bathroom operation was blamed for overloading the septic tank in the community.

Usually, the women participating in the programs paid several thousand dollars up front as a deposit and thousands more upon arrival in United States, according to investigators. The balance was paid after childbirth.

But “some or all” of that money — which for You Win likely amounted to over $1 million — went unreported to federal authorities in 2013.

“Chen failed to report hundreds of thousands of dollars in income on his 2013 federal tax return,” according to federal officials.

As women went into birth, they were taken to local hospitals and declared jobless. As many as 400 babies associated with just one of these companies were born after 2013 in Orange County, Calif., hospitals. Despite the fact that many of these women paid tens of thousands of dollars to participate in the “maternity hotel” scheme, they claimed to be unable to pay the hospitals, which typically charged about $25,000 per birth.

Some paid nothing at all, while others paid a fee closer to $4,000.

No one was arrested during Tuesday’s raids. But Immigration and Customs Enforcement agents collected evidence and potential witnesses for use in future prosecutions on tax, immigration and fraud charges.