Rhizobium-legume nitrogen-fixing symbiosis involves the formation of a specific organ, the root nodule, which provides bacteria with the proper cellular environment for atmospheric nitrogen fixation. Coordinated differentiation of plant and bacterial cells is an essential step of nodule development, for which few transcriptional regulators have been characterized. MtEFD (Medicago truncatula ETHYLENE RESPONSE FACTOR REQUIRED FOR NODULE DIFFERENTIATION) encodes an AP2/ERF (APETALA2/ETHYLENE RESPONSIVE FACTOR) transcription factor, the mutation of which leads to both hypernodulation and severe defects in nodule development. MtEFD positively controls a negative regulator of cytokinin signaling, the MtRR4 (RESPONSE REGULATOR 4) gene. Here we showed that that the Mtefd-1 mutation affects both plant and bacterial endoreduplication in nodules, as well as the expression of hundreds of genes in young and mature nodules, upstream of known regulators of symbiotic differentiation. MtRR4 expressed with the MtEFD promoter complemented Mtefd-1 hypernodulation but not the nodule differentiation phenotype. Unexpectedly, a non-legume homologue of MtEFD, AtERF003 in Arabidopsis (Arabidopsis thaliana), could efficiently complement both phenotypes of Mtefd-1, in contrast to the MtEFD paralogue MtEFD2 expressed in the root and nodule meristematic zone. A domain swap experiment showed that MtEFD2 differs from MtEFD by its C-terminal fraction outside the DNA binding domain. Furthermore, CRISPR-Cas9 mutagenesis of MtEFD2 led to a reduction in the number of nodules formed in Mtefd-1, with down-regulation of a set of genes, including notably MtNF-YA1 (NUCLEAR FACTOR-YA1) and MtNF-YB16, which are essential for nodule meristem establishment. We therefore conclude that nitrogen-fixing symbiosis recruited two proteins originally expressed in roots, MtEFD and MtEFD2, with distinct functions and neofunctionalization processes for each of them.