As the opioid epidemic has ravaged U.S. communities, the national rate of children removed from their homes due to parental drug use has soared, according to a new study.

The research, published online Monday in the Journal of the American Medical Association Pediatrics, found that more than 36 percent of children who went into foster care in 2017 were removed from their homes at least in part due to parental drug use. That was compared with the less than 15 percent of children whose parents’ drug use played a role in their foster care placement in 2000.

During that period, from 2000 to 2017, nearly 5 million children were removed from their homes. Of those youngsters, nearly 1.2 million, or a little over 23 percent, were removed because of parental drug use.

Underlying these numbers, wrote the authors, is the trauma likely experienced by these children, both before they were removed from their homes and after.

Children removed from their homes because of their parents’ drug use were more likely to be younger than children removed for other reasons, said the researchers, who were affiliated with Cornell’s and Harvard’s medical schools and Boston Children’s Hospital.

In addition, they noted that previous research had shown that children who enter foster care because their parents used drugs tend to remain in placement longer than other children in foster care and are less likely to be reunited with their parents.

“This is of special concern because of the large proportion of children experiencing entry before age 5 years, a critical period for forming stable attachments,” the authors wrote.

Nationally, the number of children in foster care has risen since 2012, after a decade of decline. The study set out to see whether part of that increase might be attributed to the opioid crisis that has swept much of the nation.

But these numbers may understate the real problem.

“It’s very possible that the number of children who lived with a parent who did drugs is much higher,” said coauthor Angelica Meinhofer, a health-care policy and research instructor with Weill Cornell Medical.

The researchers hope this study will spark a deeper look into causes and consequences of their findings as well as “greater resource allocation to this vulnerable population,” said Meinhofer.