In the past, when the desert came, the giraffes, elephants, lions, and other large animals retreated toward the Mediterranean and into mountains like the Tibesti or the Atlas ranges; when the Sahara went green again, the animals could spread down onto the plains following the rivers and lakes.