Mammalian pregnancy evolved in the therian stem lineage, that is, before the common ancestor of marsupials and eutherian (placental) mammals. Ancestral therian pregnancy likely involved a brief phase of attachment between the fetal and maternal tissues followed by parturition—similar to the situation in most marsupials including the opossum. In all eutherians, however, embryo attachment is followed by implantation, allowing for a stable fetal–maternal interface and an extended gestation. Embryo attachment induces an attachment reaction in the uterus that is homologous to an inflammatory response. Here, we elucidate the evolutionary mechanism by which the ancestral inflammatory response was transformed into embryo implantation in the eutherian lineage. We performed a comparative uterine transcriptomic and immunohistochemical study of three eutherians, armadillo (Dasypus novemcinctus), hyrax (Procavia capensis), and rabbit (Oryctolagus cuniculus); and one marsupial, opossum (Monodelphis domestica). Our results suggest that in the eutherian lineage, the ancestral inflammatory response was domesticated by suppressing one of its modules detrimental to pregnancy, namely, neutrophil recruitment by cytokine IL17A. Further, we propose that this suppression was mediated by decidual stromal cells, a novel cell type in eutherian mammals. We tested a prediction of this model in vitro and showed that decidual stromal cells can suppress the production of IL17A from helper T cells. Together, these results provide a mechanistic understanding of early stages in the evolution of eutherian pregnancy.