Babies who are exposed to prescription opioids while in the womb are more likely to be diagnosed with an infection, eczema or asthma, researchers have found.
The study from the University of Western Australia analysed health records of 401,462 children born in WA between 2003 and 2018.
It found children who had prenatal exposure to opioids such as oxycodone, methadone and codeine were likely to be diagnosed with an infection, dermatitis or eczema after birth.
Later in life, the infants were also more likely develop asthma.
"Opioids had been found in animal studies to alter the developing immune system, potentially impacting its ability to respond appropriately to infections and other challenges," lead author Erin Kelty said.
"But we didn't know if this similarly occurred in humans and what role the timing and type of exposure played.
"We found there were significant differences in outcomes depending on the specific opioid and its intended use, such as for pain treatment or opioid use disorder."
The study showed exposure to opioids in the womb was not linked to an increased risk of allergies, anaphylaxis or autoimmune conditions.
But the presence of neonatal abstinence syndrome - a condition where babies experience opioid withdrawal symptoms after birth - might contribute to the risk of infection and skin conditions.
The research findings highlighted the importance of further study into opioid-induced immune changes during pregnancy and the potential long term impacts, Dr Kelty said.