If you’ve ever noticed a slimy film of algae on a rock, chances are you didn’t pay it much attention. But some of these overlooked species hold clues to one of the greatest mysteries of evolution, scientists have found: how plants arrived on land.

On Thursday, researchers published the genomes of two algae that are among the closest known living relatives of land plants. They already had some of the key genes that plants would need to thrive on dry land.

Intriguingly, the authors of the new study find that the forerunners of plants gained some of their ability to survive on land by grabbing genes from other species — specifically, from bacteria.

Already, other researchers are planning how they will use the new genomes to run experiments of their own. “The paper represents a milestone for the field of early plant evolution,” said Jan de Vries, a plant biologist at the University of Göttingen in Germany, who was not involved in the study.