WASHINGTON — The health care law has opened up an unusual opportunity for some mothers-to-be to save on medical bills for childbirth.

Lower-income women who signed up for a private policy in the new insurance exchanges will have access to additional coverage from their state’s Medicaid program if they get pregnant. Some women could save hundreds of dollars on their share of hospital and doctor bills.

Medicaid already pays for nearly half of U.S. births, but this would create a way for the safety-net program to supplement private insurance for many expectant mothers.

Officials and advocates say the enhanced coverage will be available across the country, whether or not a state expands Medicaid under the health law. However, states have different income cutoffs for eligibility, ranging from near the poverty line to solid middle class.

The main roadblock right now seems to be logistical: reprogramming state and federal computer systems to recognize that certain pregnant women have a legal right to coverage both from Medicaid and private plans on the insurance exchange. Technically, they can pick one or the other, or a combination.

States and insurers will have to sort out who pays for what.

Another big challenge will be educating the public about this latest health law wrinkle. It’s complicated for officials and policy experts, let alone the average consumer.

“This is an issue where women are going to have to figure out, ‘I’m eligible for both, now how do I do that?’” said Matt Salo, executive director of the National Association of Medicaid Directors, which represents state programs. “But what a wonderful problem to have. This is a great problem to have from the consumer’s perspective.”

The cost impact for federal and state taxpayers is uncertain. Providing more generous coverage increases costs, but comprehensive prenatal care can save money by preventing premature births and birth defects.

Cynthia Pellegrini, head of the March of Dimes’ Washington office, said many women might not have been thinking about maternity benefits when they signed up for coverage under the health law. After all, half of U.S. pregnancies are unplanned. Often consumers just focus on the monthly premium when they select a plan.

The cost of normal uncomplicated childbirth averages $5,000, said Pellegrini, and preterm births can cost more than 10 times that. Copayments and deductibles add up fast.

“A lot of women, particularly in a situation like childbirth, could end up with significant out-of-pocket costs,” Pellegrini said. “If they are eligible for Medicaid, they could be protected from costs ranging from hundreds to thousands of dollars.” Her group works to prevent birth defects by promoting healthy pregnancies.

Existing Medicaid policies, subsidized private coverage under President Barack Obama’s law and an obscure Treasury Department ruling combined to produce the new options for pregnant women.

Medicaid is a federal-state program that covers low-income and disabled people. Before the health law, states offered special, time-limited coverage to uninsured pregnant women until their children were born. That coverage is not only for poor women; some states provide benefits to middle-class women as well.

Then came the Affordable Care Act, with federally subsidized private insurance for people who don’t have a health plan on the job. The law, however, drew a line between Medicaid and coverage through the exchanges: If you’re eligible for Medicaid you generally can’t get government-subsidized private insurance.

That barrier fell away when the Treasury Department ruled that Medicaid’s targeted insurance for pregnant women did not meet the definition of “minimum essential coverage” required by the health law. That’s because the coverage is temporary and states can restrict the services the pay for.

The ruling last summer opened the possibility for pregnant women to tap both benefit programs, said Dipti Singh, an attorney with the National Health Law Program in Los Angeles.

“Usually you could only be in one or the other,” said Singh. “This is different in that pregnant women are eligible for both.”

But the ruling apparently came too late to program into the computers.

The option works differently depending on a woman’s circumstances, Singh said.

Many women with low incomes would be better off sticking with Medicaid only because most states have opted to provide comprehensive services for expectant mothers.

But a woman in an exchange plan would be able to limit her cost-sharing and gain access to enhanced maternity benefits if she opted into Medicaid as well. She would not have to worry about her coverage running out after the baby is born, as Medicaid’s maternity-only coverage does.