The 'Alawi dynasty (Arabic: سلالة العلويين الفيلاليين, romanized: sulālat al-ʿalawiyyīn al-fīlāliyyīn) – also rendered in English as Alaouite, 'Alawid, or Alawite – is the current Moroccan royal family and reigning dynasty. They are an Arab Sharifian dynasty and claim descent from the Islamic prophet Muhammad through his grandson, Hasan ibn Ali. Their ancestors originally migrated to the Tafilalt region, in present-day Morocco, from Yanbu on the coast of the Hejaz in the 12th or 13th century.
The dynasty rose to power in the 17th century, beginning with Mawlay al-Sharif who was declared sultan of the Tafilalt in 1631. His son Al-Rashid, ruling from 1664 to 1672, was able to unite and pacify the country after a long period of regional divisions caused by the weakening of the Saadi Sultanate, establishing the Alawi Sultanate that succeeded it. His brother Isma'il presided over a period of strong central rule between 1672 and 1727, one of the longest reigns of any Moroccan sultan. After Isma'il's death, the country was plunged into disarray as his sons fought over his succession, but order was re-established under the long reign of Muhammad ibn Abdallah in the second half of the 18th century. The 19th century was marked by the growing influence of European powers.