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 789 CE.
Many of the first inhabitants were refugees fleeing from an uprising in Cordoba (modern-day Spain)  However, in 809 CE 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).
One good example of how the refugees contributed to making Fez flourish during the early years is the University of Al-Karaouine (or al-Qarawiyyin) that was built by a Tunisian refugee in 859 CE.
 It is considered the oldest university in the world.

Under the Almoravids, Fez lost its status as a capital when the Almoravids created Marrakech, which they made their capital.
The Almoravids destroyed large parts of Fes el Bali but managed to create modern-day Fes el Bali when they united the twin cities by tearing down that separated them and by building bridges across the Fez river.

During Almohad rule, Fez was a thriving merchant city, even though it was not a capital, and even became the largest city in the world during that time, with approximately 200,000 people living there.

After defeating the Almohads in Morocco, the Marinids moved the capital from Marrakech back to Fez.
This marked the beginning of the greatest period of the history for Fes el Bali.
When the Marinids moved the capital to Fez in 1276 they started building a new town outside the old city walls.
At first it was called the white city, but after a while it got a new name: Fes Jdid, or New Fez.
This is when Fes el Bali, or the old Fez, got its name too.
In the 14th century a mellah was added to the urban fabric.
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 789 CE. Many of the first inhabitants were refugees fleeing from an uprising in Cordoba (modern-day Spain)  However, in 809 CE 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). One good example of how the refugees contributed to making Fez flourish during the early years is the University of Al-Karaouine (or al-Qarawiyyin) that was built by a Tunisian refugee in 859 CE.  It is considered the oldest university in the world.
Under the Almoravids, Fez lost its status as a capital when the Almoravids created Marrakech, which they made their capital. The Almoravids destroyed large parts of Fes el Bali but managed to create modern-day Fes el Bali when they united the twin cities by tearing down that separated them and by building bridges across the Fez river. 
During Almohad rule, Fez was a thriving merchant city, even though it was not a capital, and even became the largest city in the world during that time, with approximately 200,000 people living there. 
After defeating the Almohads in Morocco, the Marinids moved the capital from Marrakech back to Fez. This marked the beginning of the greatest period of the history for Fes el Bali. When the Marinids moved the capital to Fez in 1276 they started building a new town outside the old city walls. At first it was called the white city, but after a while it got a new name: Fes Jdid, or New Fez. This is when Fes el Bali, or the old Fez, got its name too. In the 14th century a mellah was added to the urban fabric.
Fes el Bali