Root-knot nematodes and rhizobia establish interactions with roots characterized by the de novo induction of host structures, termed giant cells and nodules, respectively. Two transcription regulators, PHAN and KNOX, required for the establishment of meristems were previously shown to be expressed in tomato giant cells. We isolated the orthologues of PHAN and KNOX (Mt-phan and Mt-knox-1) from the model legume Medicago truncatula, and established the spatial distribution of their expression in situ. We confirmed that Mt-phan and Mt-knox-1 are expressed in lateral root initials and in nematode-induced giant cells and showed that they are expressed in nodules induced by Sinorhizobium meliloti. Expression of both genes becomes spatially restricted as the nodules develop. We further examined nematode feeding sites for the expression of two genes involved in nodule formation, ccs52 (encodes a mitotic inhibitor) and ENOD40 (encodes an early, nodulation mitogen), and found transcripts of both genes to be present in and around giant cells induced in Medicago. Collectively, these results reveal common elements of host responses to mutualistic and parasitic plant endosymbionts and imply that overlapping regulatory pathways lead to giant cells and nodules. We discuss these pathways in the context of phytohormones and parallels between beneficial symbiosis and disease.