Southern California apartment complexes that doubled as "maternity hotels" for Chinese women who want made-in-America babies were raided early Tuesday, capping an unprecedented federal sting operation, officials said.

NBC News was on the scene as Homeland Security agents swept into The Carlyle, a luxury property in Irvine, California, which housed pregnant women and new moms who allegedly forked over $40,000 to $80,000 to give birth in the United States.

"I am doing this for the education of the next generation," one of the women told NBC News.

None of the women were arrested; they are being treated as material witnesses, and paramedics were on hand in case any of them went into labor during the sweep.

Instead, the investigation was aimed at ringleaders who pocketed hundreds of thousands of dollars tax-free to help Chinese nationals obtain visas and then pamper them until they delivered in an American hospital at a discount, court papers show.

"It's not necessarily illegal to come here to have the baby, but if you lie about your reasons for coming here, that's visa fraud," said Claude Arnold, special agent in charge of Homeland Security Investigations for Los Angeles.

All told, the feds raided 20 locations in Los Angeles, Orange and San Bernardino counties, targeting three competing birth tourism schemes, officials said. The suspected operators have not been charged but are being questioned.

The organizers who allegedly ran the Carlyle site, Chao Chen and Dong Li, used a website to drum up business, touting the benefits of a child with U.S. citizenship: 13 years of free education, low-cost college financial aid, less pollution, and a path for the entire family to emigrate when the child becomes an adult.

Image from a website that federal authorities say was used to recruit Chinese women to come to the U.S. to have their babies. youyunmeiguo

Clients were counseled on what lies to tell to obtain a tourist visa; how to fly through Hawaii, Las Vegas or Korea to avoid suspicious immigration officers at Los Angeles International Airport; and how to disguise their pregnancy in transit, according to search warrant affidavit unsealed Tuesday.

The women were then set up at the Carlyle, which charges about $3,000 a month for a two-bedroom apartment and features amenities including private balconies, a resort-style pool, and cabanas with flat-screen televisions.

A neighbor, Linda Trust, told NBC News she did find it strange that she had seen a forklift deliver a huge pile of diapers to the buildings but had never seen a baby.

The women's handlers provided transportation for doctor visits and trips to restaurants and shops, the court papers say. An agent tailing one of the suspects followed them to Target and Babies R Us.

They were funneled to several Orange County hospitals to deliver, but they didn't pay full price — approximately $25,000 — for medical services, officials said. Instead, they got reduced rates for the indigent, ranging from nothing to $4,000, the court papers say.

That translated into big losses for the hospitals. More than 400 babies linked to the scheme were born at just one facility in a two-year period, investigators said.

The investigators discovered that the parents of one baby born in April 2014 who paid the hospital just $4,000 were spending money at the Wynn Las Vegas Hotel, Rolex and Louis Vuitton, using an account with almost a quarter of a million dollars in it.

The fraud, authorities say, went beyond the visas.

Li didn't file a U.S. tax return and Chen didn't declare hundreds of thousands of dollars in proceeds, the affidavit says. In addition, Chen and his wife, Jie Zhu committed marriage fraud, pretending to be divorced so they could get "green-card" marriages in the U.S., the feds charged.

Efforts to reach Chen, Zhu and Li by phone were unsuccessful. It was not clear if they have retained legal counsel.

The phenomenon of foreigners coming to the U.S. to have babies is not new but appears to be growing. One study found that 40,000 children a year are born to women here on a travel visa, the affidavit notes.

Image from a website that federal authorities say was used to recruit Chinese women to come to the U.S. to have their babies.

Tuesday's crackdown marked the first large-scale federal probe of birth-tourism kingpins in the continental U.S.

In addition to the operation at the Carlyle, the feds zeroed in on two other alleged schemes.

Wen Rui Deng, Li Yan Lang and Wen Shan Sun were accused of charging women $10,000 to $25,000 to put them up at the Pheasant Ridge apartments in Rowland Heights, where the "one dragon service" included baby nurses, the court papers say.

A company called USA Happy Baby, run by Michael Wei Yueh Liu and Jing Dong, set up at The Reserves apartments in Rancho Cucamonga, authorities charged.

The probe into the Carlyle started in June 2014 when the Irvine Police Department received an anonymous tip about the scheme that was turned over to Homeland Security. Separately, U.S. Customs and Immigration Services received a similar tip.

Image from a website that federal authorities say was used to recruit Chinese women to come to the U.S. to have their babies.

An agent posed as a client who wanted to arrange for his cousin to give birth in America, and got Chen to spill the details of the scheme — from how his China-based employees would "prep" the woman for her consulate interview to why she should not fly straight to LA.

"I don't do it because it's too risky," he said. "That's because 90 percent of the work is already done before they come over, and if they get sent back on the same plane, then I'm the one to blame for it."

The investigators went through Li's trash, examined hospital records, followed the suspects and their clients on a trip to a Chinese restaurant and and combed through bank records.

At one point, Chen was caught on tape fretting to the undercover that the government might realize he was not paying taxes he owed on money he collected in China.

"I do file taxes but there are so any things that I can't explain clearly," he said.