In 1906, Sultan Abdel Aziz of Morocco dispatched a military expedition led by Moulay Idriss to defend the Sahara against French encroachment, culminating in the Battle of Nimlane.