When the Mediterranean Sea was a hot dry hollow near the end of the Messinian Salinity Crisis in the late Miocene, Faiyum was a dry hollow, and the Nile flowed past it at the bottom of a canyon (which was deep or more where Cairo is today). After the Mediterranean reflooded at the end of the Miocene, the Nile canyon became an arm of the sea reaching inland further than Aswan. Over geological time that sea arm gradually filled with silt and became the Nile valley.