street and the
minaret of the
Bou Inania Madrasa (left) and another mosque (right).|alt=|left As the capital for his newly acquired empire,
Idris ibn Abdallah chose to build a new town on the right bank of the
Fez River in AD 789. Many of the first inhabitants were refugees fleeing from an uprising in
Cordoba (modern-day Spain). However, in 809 his son,
Idris II, decided to found a capital of his own on the opposite bank of the
Fez River. Even though they were only separated by a relatively small river the cities developed separately and became two individual cities until they were unified in the 11th century by the
Almoravids. There were many refugees who decided to settle in the new city this time too, however this time they fled from an uprising in
Kairouan (in modern
Tunisia). The
Al-Andalusiyyin Mosque (or Mosque of the Andalusians), on the opposite shore of the river, is likewise traditionally believed to have been founded by her sister in the same year. and University, founded in the 9th century and rebuilt and expanded in later centuries Under the Almoravids, Fez lost its status as a capital, which was moved to the newly created
Marrakesh. During
Almohad rule (12th-13th centuries), Fez was a thriving merchant city, even though it was not a capital. After defeating the Almohads in Morocco, the
Marinids moved the capital from Marrakesh back to Fez. This marked the beginning of the greatest period of the history for Fes. They built a number of new forts and
bastions around the city which appear to have been aimed at keeping control over the local population. They were mostly located on higher ground overlooking Fes el-Bali, from which they would have been easily able to bombard the city with canons. In 1912
French colonial rule was instituted over Morocco following the
Treaty of Fes. Fez ceased to be the center of power in Morocco as the capital was moved to
Rabat, which remained the capital even after independence in 1956. The existence today of a
Ville Nouvelle ("New City") alongside a historic medina of Fez was thus a consequence of this early colonial decision-making and had a wider impact on the entire city's development. == Geography and layout ==