Every April for the past decade, systems biologist Rodrigo Gutiérrez has driven 1,600 kilometers (1,000 miles) to reach one of the driest places on Earth: Chile’s Atacama Desert, parts of which receive less than three millimeters of rain annually. His team collected plants and soil from nearly two dozen sites each year, froze the samples in liquid nitrogen, and brought them back to his laboratory at the Pontifical Catholic University of Chile. For a new study in the Proceedings of the National Academy of Sciences USA, Guitérrez and his colleagues analyzed the plants’ genes and the microorganisms that help them thrive in such extreme conditions.

“We knew almost nothing about how these plants survived,” Gutiérrez says. “There was great potential to study these wild species, which is now a little easier with all the genomic tools that we have.” His team investigated 32 plant species, some closely related to grains, legumes and potato crops, from three altitude ranges.

Scientists usually conduct genetic studies on lab-grown plants, which lets researchers tightly control factors such as the amount of nutrients and light the plants receive. But sampling plants in nature captures critical differences based on their varied living conditions. This study “merges the genomics with ecological understanding of how plants behave in their natural environment,” says University of California, Davis, plant biologist Neelima Sinha, who was not involved in the research. “That just by itself makes it very significant.”

To identify genes that contribute to the plants’ survival, Gutiérrez worked with ecologists, plant biologists, genomics experts and computer scientists to compare the genetic codes of the sampled Atacama species with those of closely related plants. In what the researchers describe as a “genetic gold mine,” they traced genomes’ evolutionary changes and identified adaptive mutations related to stress response, metabolism and energy production. These mutations might help desert plants tolerate intense solar radiation, optimize water capture and adjust flowering times. The researchers also discovered an abundance of bacteria that live on the desert plants’ roots and convert nitrogen from the air into a usable form, aiding growth in nitrogen-poor soils.

Researchers could potentially insert newfound genes into food plants and grasses used for biofuel, Gutiérrez says, giving such species better survival odds when planted in saltier soils and areas experiencing drought—conditions expected to become more severe with climate change.