The two successive Berber Dynasties of Morocco were the Almoravids (المرابطون) and the Almohads (الموَحدون) controlled the entirety of Morocco and ruled it as Islamic Dynasties.
However, the dynasty that united Morocco under Islamic Rule was the Arab Umayyads. The first Islamic Moroccan Kingdom was the Arab Idrissids (الأدارسة). Not soon after the foundation of the Idrissid Caliphate, a small Berber region of Tamesna revolted an established the Barghawata Emirate (إمارة بورغواطة). While this was the first Berber Kingdom in Morocco, it never unified Morocco.