In the 13th century the Marinids, a Berber dynasty, ruled what is now this country with Fez as their capital
The Idrisids established Fes as their capital and Morocco 
became a centre of ... Morocco would reach its height under a series of Berber 
dynasties that... [DOC] [TLE] Chronology - Al-Maghrib-Expert [PAR] in what is now western Algeria) under their own rulers and ... Sijilmassa and the 
Idrisids of Fez were frequently at odds ... to Egypt, and their new capital in Cairo.