The Idrisid Dynasty was the first Muslim dynasty in Morocco, established by Idris I in the late 8th century. It played a crucial role in shaping the political and social landscape of the Maghreb, promoting Islam and establishing a lineage of leadership that would influence the region for centuries.