The river Genil runs through the valley upon exiting from the Sierra Nevada until it passes through the Infiernos de Loja.
It runs roughly east–west for about 65 kilometres (40 mi) and reaches its greatest width in the eastern part and its narrowest as it arrives at the Infiernos de Loja.
It took on its current shape by the end of the Miocene, acting as an enclosed drainage basin of continental character, receiving sedimentary material from all of the surrounding mountain ranges.
The peak of this sedimentation activity was during the Villafranchian (the first phase of the Pleistocene); at that time there appears to have been a climate change that caused a period of rhexistasy (dryness leading to lack of ground cover) and intense erosion of all of the surrounding mountain ranges.
At the same time, the drainage basin that had basically been an inland sea began to pour out its waters through the River Genil and the Infiernos de Loja.