Root nodules occur on the roots of plants (primarily Fabaceae) that associate with symbiotic nitrogen-fixing bacteria. Within legume nodules, nitrogen gas from the atmosphere is converted into ammonia.
Legumes release compounds called flavonoids from their roots, which trigger the production of nod factors by the bacteria. When the nod factor is sensed by the root, a number of biochemical and morphological changes happen: cell division is triggered in the root to create the nodule, and the root hair growth is redirected to wind around the bacteria multiple times until it fully encapsulates one or more bacteria. The bacteria encapsulated divide multiple times, forming a microcolony. From this microcolony, the bacteria enter the developing nodule through a structure called an infection thread, which grows through the root hair into the basal part of the epidermis cell, and onwards into the root cortex; they are then surrounded by a plant-derived membrane and differentiate into bacteroids that fix nitrogen.