According to tradition, the Alaouites entered Morocco at the end of the 13th century when Al Hassan Addakhil, who lived in the town of Yanbu in the Hejaz, was brought to Morocco by the inhabitants of Tafilalet to be their imām. They were hoping that, as he was a descendant of Muhammad, his presence would help to improve their date palm crops thanks to his barakah ("blessing"), an Arabic term meaning a sense of charisma. His descendants began to increase their power in southern Morocco after the death of the Saadi dynasty ruler Ahmad al-Mansur (1578–1603). In 1659, the last Saʻadī sultan was overthrown before the conquest of Marrakesh by Mulay al-Rashid (1664–1672). After the victory over the Zaouia of Dila, who controlled northern Morocco, he was able to unite and pacify the country.