Transposon-mediated rewiring of gene regulatory networks contributed to the evolution of pregnancy in mammals.