Alterations in long-term social behavior and gene expression were observed in the offspring of mice exposed to pain-killing opioids during pregnancy.