The Moroccan Kasbah was a place for the local Caid or Pacha to live in and a place of defense when a city was under attack not unlike the medieval European keep. Sometimes, they were built on hilltops so that they could be more easily defended such as the famous Ait Benhaddou near Ouarzazate. It is no accident that many great films like Lawrence of Arabia and Gladiator were filmed here because it retains the character and atmosphere of centuries ago when it was an important post on the camel caravan route from Africa to Morocco.