Scientists have sequenced the entire genome of the tiny fern species Azolla filiculoides, a wunder-plant that played a pivotal role in cooling our planet 50 million years ago. Among its many properties, the Azolla can capture CO2 and nitrogen from the air and has genes that provide insect resistance.

Today, the Azolla filiculoides fern— with leaves the size of gnats — is found scattered throughout the world’s warm temperate and tropical regions. Some 50 million years ago, however, the planet was a much hotter place and Azolla grew as far north as the Arctic Ocean. Fossil records show that, fueled by abundant nitrogen and carbon dioxide, the fern formed thick mats across the entire ocean and crept onto the surrounding continents. Over the course of 1 million years, the plant pulled an estimated tens of trillions of tons of CO2 from the atmosphere, which scientists believe helped cool the planet to a climate more similar to what Earth has today.

For years, scientists have been studying whether Azolla filiculoids could help counteract rising greenhouse gas emissions and global temperatures. Researchers say sequencing the species’ genome, done by more than 40 scientists from around the world and supported partly by a crowdfunding campaign, will provide the first real clues as to how effective the plant would be combatting climate change. The research is published in the journal, Nature Plants.

Scientists are also interested in the plant’s ability to fix nitrogen for crops, and its resistance to insects. Azolla has a symbiotic relationship with the cyanobacteria Nostoc azollae, which live in special cavities inside Azolla’s leaves. The cyanobacteria captures nitrogen from the air and converts it into something the ferns — and surrounding plants — can use, eliminating the need for added nitrogen fertilizers. Farmers in Asia have been growing Azolla in their rice paddies for more than 1,000 years. Sequencing the plant’s genome has given scientists a better understanding of the evolutionary history of this relationship, and how it is passed from generation to generation of the fern.

The researchers were also able to identify a gene specific to Azolla that gives the fern resistance to insects. “In general, insects don’t like ferns, and scientists wondered why,” Fay-Wei Li, a plant evolutionary biologist at Cornell University’s Boyce Thompson Institute and the lead author of the new study, said in a statement. Li and his colleagues found that the fern’s insect-resistant genes likely transferred from a bacterium. “It’s a naturally modified gene, and now that we’ve found it, it could have huge implications for agriculture,” Li said.