Autonomous Muslim Berber powers define the late medieval period (1000–1400 A.D.) in western North Africa. Despite periods of struggle among different dynasties, the entire region is united under Almohad rule. Later, under the Hafsids in the east and Marinids in the west, the Maghrib enjoys stability. Patronage and the creation of metropolitan centers such as Fez, Marrakesh, and Tunis stimulate developments in philosophy and the arts.