The city was founded on a bank of the Oued Fes (Fez River) by Idris I in 789, founder of the Idrisid dynasty. His son, Idris II (808),[2] built a settlement on the opposing river bank in 809 and moved his capital here from Walili (Volubilis).[3]:35[4]:35[5]:83 These settlements would soon develop into two walled and largely autonomous sites, often in conflict with one another: Madinat Fas and Al-'Aliya.