Thousands of years ago, enough rain fell on northern Africa that the Sahara was a land of lakes instead of a desert. People hunted big animals across the green landscape and painted scenes of their triumphs on cave walls. Now, stalagmites from a Moroccan cave have revealed the full extent of this lush environment.

Researchers had pieced together the broad outlines of the Sahara’s greening, which reached its peak 9,000–6,000 years ago. But they hadn’t known how far north the green Sahara stretched, or how long it lasted at its northern fringes.

Hai Cheng at Xi’an Jiaotong University in China and his colleagues studied three stalagmites from Wintimdouine Cave in southwest Morocco. Oxygen isotopes in the rock layers preserve a record of the area’s rainfall throughout the past 11,500 years.

The stalagmites showed that the climate became rainy around 9,000 years ago and dry around 4,000 years ago. The formations confirm that the West African summer monsoon extended north to the cave — information that scientists can now use to better understand weather patterns across the region.