The geology of Western Sahara includes rock units dating back to the Archean more than two billion years old, although deposits of phosphorus formed in the Mesozoic and Cenozoic have helped to prompt the current Moroccan occupation of most of the country.