Symbiotic rhizobial bacteria and legumes have evolved complex signal exchange mechanisms that enable bacteria to penetrate the plant root and develop root nodules, where bacteria fix nitrogen. Now, Ren, Wang et al. uncover a new signalling mechanism by which bacteria regulate root nodulation. The authors found that tRNA-derived small RNA fragments (tRFs) from the rhizobium Bradyrhizobium japonicum modulate nodule numbers in the soybean Glycine max by hijacking the host RNAi machinery and regulating host gene expression. Five host genes involved in root hair and plant development were found to be regulated by tRFs, and silencing the tRFs or overexpressing their targets repressed nodule formation. By contrast, repression of the targets through miRNAs identical to the tRFs or CRISPR–Cas knockout promoted nodulation. These findings provide a new mechanism that could be exploited to enhance nodulation in legumes.