They contain symbiotic bacteria called rhizobia within the nodules, producing nitrogen compounds that helpthe plant to grow and compete with other plants. When the plant dies, the fixed nitrogen is released, making it available to other plants and this helps to fertilize the soil.