Children are more likely to be diagnosed with autism if their mothers took antidepressants during pregnancy, a new study shows.

In the new study, women who took antidepressants in the last six months of pregnancy were 87% more likely to have a child later diagnosed with autism. Doctors saw no increase in autism rates in women who took medication for depression in the first three months of pregnancy, according to the study, published online Monday in JAMA Pediatrics.

Rates of autism in the study were lower than in the U.S. population. In the study, the overall rate of autism was 0.7%; that rate rose to 1.2% among women who took antidepressants in the second or third trimester.

In the U.S., about 2.2% of children ages 3 to 17 — about one in 45 — have autism, according to the Center for Disease Control and Prevention's National Health Interview Survey, conducted in 2014.

People with autism — a complex condition of brain development — tend to have difficulty with social interaction and verbal and non-verbal communications and are prone to repetitive behaviors. While many researchers describe autism as a development disability, some people with autism say they are simply different, rather than disabled.

Doctors note that depression is a serious and sometimes life-threatening condition and women shouldn't stop taking their medications because of one study. Women who took a specific type of antidepressants, called selective serotonin re-uptake inhibitors, or SSRIs, had more than double the risk of having a child with autism. Women who took more than one medication for depression – a condition that suggests more severe depression – were four times as likely to have a child with autism, according to the study, led by researchers at the University of Montreal.

"The overwhelming number of women who use SSRIs during pregnancy don't have a child with autism," said Susan Hyman, chief of neurodevelopmental and behavioral pediatrics at Golisano Children’s Hospital at the University of Rochester in New York, who wasn't involved in the new study.

Other studies have found no link between autism and antidepressants, said Paul Wang, head of medical research at the advocacy group Autism Speaks, who was not involved in the new report.

The study also has some significant flaws, Wang said. For example, doctors didn't include babies born prematurely, a known risk factor for autism, he said.

Pregnant women who are concerned about their medications should talk to their doctor, Wang said. Studies have found that treating a pregnant woman's depression with medications decreases the risk that they will give birth prematurely, Wang said, and women whose depression is under control may be able to take better care of themselves and their children.

The new study is valuable, however, because it's part of a growing body of research that suggests that the events that cause autism largely occur before birth, Hyman said.

Studies have found that children are at higher risk for autism, for example, if they are born early or very small. Children are also at higher risk if they are in medical distress during delivery; if they have older mothers or fathers; or if they are born less than a year after an older sibling. Autism risk also goes up for women who are obese; if they have diabetes or high blood pressure; if they are hospitalized for an infection; if they're exposed to significant air pollution during pregnancy; if they had low levels of folic acid in early pregnancy; or if they take an anti-seizure drug called valproic acid.

Hyman notes that pregnancy is a crucial time for brain development. "It's really during pregnancy that the hard-wiring of the brain takes place," Hyman said.