The history of the city of Oujda spans over a thousand years and is closely linked to its strategic position at the crossroads of civilizations. The city was founded in 994 AD by Ziri ibn Atiya, the chief of the Maghrawa Berber tribe, who established it as his capital. Located in the northeast of Morocco, near the border with Algeria, Oujda became an important military, political, and commercial centre from its very inception.
A key factor in the city's rise was its strategic location. Oujda controlled vital caravan routes connecting the interior regions of the Maghreb with the Mediterranean, serving as a gateway between the east and west of North Africa. Due to its significance, the city was a battleground for various dynasties over the centuries, including the Almoravids, Almohads, and Marinids, leading to its repeated destruction and reconstruction.
Oujda's early economy was based on transit trade and agriculture, which flourished on the surrounding fertile lands. Culturally, the city absorbed Arab, Berber, and Andalusian influences, which is reflected in its architecture, traditions, and crafts. The Old Medina (historical centre) still preserves the spirit of that era, standing as a living monument to Oujda's rich past.