Many plants need bacterial roommates to survive. So why do some kick them out?

When it comes to getting one of their most critical nutrients, some plants recruit tiny friends: soil bacteria that live in bumps on their roots and harvest nitrogen from the air. A new study reveals that these partners are expensive to keep, however, so much so that some species have given up on these microbial gardeners.

Species from 10 plant families—including peanuts, beans, and mimosa trees (pictured)—all thrive in poor soils because they partner with so-called nitrogen-fixing bacteria. But plant biologists have long puzzled over why the other 18 families in this kingdom, and even some species within those 10, haven’t also evolved this beneficial trait.

To find out, researchers sequenced seven genomes of nitrogen-fixing plant species and three closely related species that don’t fix nitrogen. They compared the gene makeup of these with 27 other plant genomes, 18 of them nitrogen-fixers. The analysis suggests the ability to form these partnerships evolved in the common ancestor to the 10 families that have this capability but was lost at least eight times after a gene key to the plant getting hooked up with bacteria mutated or was lost altogether, the team reports today in Science .

These multiple losses suggest the nitrogen-fixing plants invest a lot of energy in these partnerships, so much so that if there’s enough nitrogen in the soil, they stop forming these partnerships and eventually lose the ability to form them at all.

Nitrogen fixation is such a valuable trait that millions of dollars are being spent to endow crops with this ability. But the new work suggests plant scientists need to keep these potential costs in mind.