The kasbah was originally founded in the 17th century.[3][1][2] It initially consisted of a fortified village, a ksar, occupying a strategic location along the river and at the entrance to the Skoura palmeraie.[4] Towards the end of the 19th century M'hamed Ben Brahim Nasiri, a faqih from a local privileged family living in the ksar (descendants of the family associated with the prestigious Zawiya Nasiriyya in Tamegroute[5]), was chosen by Madani El Glaoui (older brother of Thami el Glaoui) to educate his sons in reading the Qur'an. As compensation, El Glaoui commissioned his craftsmen to build Nasiri a tighremt (fortified mansion) at the ksar.[4]