Doctors are prescribing opioid painkillers to pregnant women in astonishing numbers, new research shows, even though risks to the developing fetus are largely unknown.

Of 1.1 million pregnant women enrolled in Medicaid nationally, nearly 23 percent filled an opioid prescription in 2007, up from 18.5 percent in 2000, according to a study published last week in the journal Obstetrics & Gynecology. That percentage is the largest to date of opioid prescriptions among pregnant women. Medicaid covers the medical expenses for 45 percent of births in the United States.

The lead author, Rishi J. Desai, a research fellow at Brigham and Women’s Hospital, said he had expected to “see some increase in trend, but not this magnitude.”

“One in five women using opioids during pregnancy is definitely surprising,” he added.

In February, a study of 500,000 privately insured women found that 14 percent were dispensed opioid painkillers at least once during pregnancy. From 2005 to 2011, the percentage of pregnant women prescribed opioids decreased slightly, but the figure exceeded 12 percent in any given year, according to Dr. Brian T. Bateman, an anesthesiologist at Massachusetts General Hospital, and his colleagues. Their research was published in Anesthesiology.