Around 717 million years ago, the Earth turned into a snowball. Most of the ocean, if not all of it, was frozen at its surface. The land, which was aggregated into one big supercontinent, was also covered in mile-thick ice. And then, everything changed. Volcanoes released enough carbon dioxide into the atmosphere to trap the sun’s heat and trigger global warming. The ice melted, and the surface of the sea reached temperatures of 120 to 140 degrees Fahrenheit. By 659 million years ago, the world had transformed from snowball to greenhouse. And just 14 million years later, the ice returned and the planet became a snowball for the second time.

This song of ice and fire was a momentous period for life on Earth. According to Jochen Brocks from the Australian National University, it liberated a flood of nutrients that permanently transformed the oceans, from a world that was dominated by bacteria to one where algae were ascendant. The algae, in turn, revolutionized the food webs in the sea, paving the way for the evolution of larger and increasingly complex organisms—like the first animals. If the Age of Algae had never dawned, we wouldn’t be here.

Before algae, the oceans were dominated by bacteria. Some of these microbes, the cyanobacteria, could make their own food by harnessing the power of sunlight—a process called photosynthesis. In doing so, they provided most of the oxygen in the planet’s atmosphere, and the formed the foundations of the ocean’s food webs. It was their world.

Then, in a chance event, an ancient complex cell swallowed one of these cyanobacteria and gained its ability to photosynthesize. That one fused cell then gave rise to all algae and plants—everything from small green plankton that float in the ocean, to the seaweed that wraps our sushi rolls, to the flowers and trees that grace our forests.

The merger that started all of this happened sometime between 900 and 1,900 million years ago, and some scientists are trying to narrow down that range. But Brocks had a different goal: He wanted to know not when algae originated, but when they became important. When did they go from merely existing to truly thriving? When did they supplant cyanobacteria as the world’s top photosynthesizers?

To find out, he turned to cylinders of sediment, which petroleum companies remove when they dig for oil. These cylinders preserve the remains of ancient bacteria and algae that sank to the ocean floor when they died. Their cells have long since vanished, but their constituent chemicals still remain. Other scientists have tried analyzing these chemicals before, but they always got weird results because oil from the drilling machines would contaminate the sediments. That oil came from the Jurassic, 145 to 200 million years ago, so it obscured the presence of chemicals from earlier periods in time.

When Brocks realized this problem, he used industrial machines to abrade the contaminating gunk off the surface of the sediment cores. His team then ground the leftover rock into powder, and put it into what’s essentially a huge coffee machine. It pumps solvents through the powder and extracts the molecules within, producing a brown liquid that looks like (and pretty much is) oil. Brocks and his colleagues searched this goop for two particular groups of chemicals—steranes, which are found in algal cells, and hopanes, which are found in bacterial cells. By comparing the ratio of these substances, they could work out how the relative numbers of these groups changed over time.

They found that during the first snowball period, and in all the millennia before it, bacterial hopanes greatly outnumbered algal steranes. But in the interval when the planet had defrosted, between 645 and 659 million years ago, sterane levels skyrocketed by 100 to 1,000 times, reaching a peak that has persisted to this day. The diversity of steranes also went up, from a single molecule into a whole smorgasbord of them. These results are far starker than Brocks had anticipated. They clearly show that algae rose to power during a narrow 14-million-year window, becoming more abundant and more diverse.

“The causes and consequences of that rise are controversial, and I’m looking forward to people fighting about it,” says Brocks. But the evidence for the rise itself “is very clear. There’s a transition from a bacterial world to an algal one.”

Why? Brocks was puzzling over that mystery when he read a study, published last year, showing that the oceans used to have very low levels of phosphate—a vital nutrient. Phosphate levels only started to rise between 800 and 635 million years ago—exactly before the algae took off. “I thought: Wow, this can’t be a coincidence,” says Brocks.

When phosphate levels are low, bacteria do better than algae because their cells are much smaller. With more surface area for their size, they’re better able to absorb nutrients from their surroundings. “If nutrient concentrations are low, small size wins every time,” says Brocks. “In a low-phosphate world, the larger algae had no chance.”

This competition started tilting in the algae’s favor during the first snowball Earth, when mighty glaciers ground mountainsides into powder, releasing phosphate into the ocean. When the planet warmed, increased rainfall hit the newly exposed ground and washed even more phosphate seaward. It was an overkill of nutrients, the likes of which the planet hadn’t seen before. And, according to Brocks, it broke the bacterial stranglehold in the oceans.

Here’s what he thinks happened. At first, the glut of nutrients would have gone to the dominant cyanobacteria, which would have been eaten by microscopic grazing cells. These grazers capped the bacterial numbers, freeing up nutrients for the larger algae, which could finally flourish. The presence of so much algae would, in turn, have fueled the evolution of predators like rhizarians—single-celled hunters that devour around 50 percent of the ocean’s algae every day.

Entirely new food webs came to be, as did arms races between predators and prey that led to the evolution of larger and larger creatures. By the 635-million-year mark, at the dawn of the Ediacaran period, centimeter-sized organisms showed up. And it was during that period that the first animals appeared. “They all come so close to each other—phosphate came first, algae came second, animals came third,” says Brocks. “The algae provided the food and energy source that allowed organisms to become big. I just don’t think an ecosystem with sharks in it would be possible with just bacteria.”

“It presents a feasible scenario and brings together the best new data,” says Robin Kodner from Western Washington University, who studies algae both modern and ancient. “But like all historical geobiological studies, there are some oversimplifications.” For example, there are many types of algae. Of these, the green algae—and specifically, a group called the prasinophytes—are the only ones of any great ecological importance. It’s unclear if the rise in algae that Brock found is a rise in prasinophytes specifically.

Also, many prasinophytes are tiny, and only slightly bigger than cyanobacteria. There’s no particular reason why their rise should have dramatically reworked food webs in the way that Brocks suggests. The reality is that such webs are complicated. Cyanobacteria and algae coexist, filling different roles. The predators that devour one group will often eat the other too. So working out how exactly the rise of algae led to the rise of animals—or even if they did—will take more work. “And really, I don't think we can do any better than this with the data from the geological record,” Kodner says.

Events that happened hundreds of millions of years ago are necessarily hard to reconstruct, and will always be open to speculation and debate. But Brocks’s study is valuable because it unites a bunch of disparate observations into a cohesive framework, against which future discoveries can be compared, writes Andrew Knoll from Harvard University in an accompanying commentary.

And as Brocks says, “If someone comes to me and says they have a better explanation, I’d be happy to accept that.”