An increasing number of women are using cannabis before becoming pregnant, as well as early in the pregnancy, according to a new study published Friday in the journal JAMA Network Open.

The findings, from Kaiser Permanente Northern California, are based on reports from 276,991 women living in California before recreational marijuana was legalized in that state. The women were asked about their cannabis use at their first prenatal visit.

The data showed that prevalence of women who reported using marijuana during the year before pregnancy grew from 6.8 percent in 2009 to 12.5 percent in 2017.

The number of women who said they used marijuana while pregnant was much smaller; however, that prevalence also increased from 1.9 percent in 2009 to 3.4 percent in 2017.

But there's no evidence that cannabis is safe for pregnant women.

"No amount of cannabis use has been shown to be safe during pregnancy," said Kelly Young-Wolff, lead author of the new report and a research scientist with Kaiser Permanente Northern California. "We do know that cannabis crosses the placenta and reaches the fetus."

The study did not address why women had been using cannabis, though there has been anecdotal evidence some women may turn to marijuana to help ease the stress and nausea associated with morning sickness.

The researchers also found that the rates of women who said they were daily users of cannabis also increased, accounting for about 20 percent of the women who used marijuana while pregnant in 2017. That's a rise from 15 percent of women who reported using cannabis daily while pregnant in 2009.

Young-Wolff told NBC News that more frequent use during pregnancy may be associated with worse health risks for the babies.

"There is substantial evidence that cannabis use in pregnancy is associated with lower offspring birth weight," she said.

It's unclear whether the women were smoking marijuana, eating food that contained cannabis, or using the drug in other ways.

"There is reason to think that perhaps the risks vary depending on how women are using, and there's been an increase in alternative forms of cannabis consumption in recent years, like vaping and edibles," Young-Wolff said. It's a topic she plans to address in future studies.

The current study only looked at women in California, but a separate nationally representative survey released in June found 7 percent of pregnant women said they'd used marijuana in 2016-2017, compared with about 3 percent in 2002.

The American College of Obstetricians and Gynecologists strongly discourages the use of cannabis by pregnant women because of concerns that it will affect the neurodevelopment of the fetus.

In a statement, the group wrote, "obstetrician–gynecologists should be discouraged from prescribing or suggesting the use of marijuana for medicinal purposes during preconception, pregnancy, and lactation. Pregnant women or women contemplating pregnancy should be encouraged to discontinue use of marijuana for medicinal purposes in favor of an alternative therapy for which there are better pregnancy-specific safety data."

To be fair, the new data reflect just a snapshot of the true prevalence of marijuana use during pregnancy. It's impossible to say whether women in the current study continued to use marijuana throughout their pregnancy, as they were asked about cannabis use at their first prenatal visit. That usually occurs between eight and 10 weeks gestation, and the women may have been using cannabis before they were aware they were pregnant.

But that's why Young-Wolff said it's important doctors talk with women about the potential for harms associated with cannabis long before they become pregnant. The vast majority of women who reported using cannabis while pregnant — 96 percent — said they'd also used in the year prior to pregnancy.

She said the findings represent "an important opportunity for women's health clinicians to provide education about the potential harms with cannabis use during pregnancy to all women of reproductive age, and particularly those who are trying to get pregnant."

FOLLOW NBC HEALTH ON TWITTER & FACEBOOK