Legumes form a symbiotic relationship with nitrogen-fixing bacteria called rhizobia. The rhizobia live in soil and infect legume roots, forming nodules. Within the nodules, the rhizobia differentiate into bacteroids and fix atmospheric nitrogen into ammonia. The fixed nitrogen is used by the plant for growth while the bacteria receive nutrients from the plant. This symbiosis provides a natural source of nitrogen for agriculture, replacing the need for synthetic nitrogen fertilizers for legume crops.