Oujda lies on the main axis connecting Morocco with the rest of North Africa (the Romans built a road through here). Like Taza, it occupied a key position in controlling the east and was often seen as a vital stepping stone for armies aiming to seize control of the heartland around it.
Founded by the Meghraoua tribe in the 10th century, Oujda remained independent until the Almohads overran it a century later. Under the Merenids, Algerian rulers based in Tlemcen took the town on several occasions, and in the 17th century it fell under the Ottomans in Algiers.
Moulay Ismail put an end to this in 1687, and Oujda remained in Moroccan hands until 1907, when French colonial forces in Algeria crossed the frontier and occupied the town in one of a series of similar ‘incidents’. The protectorate was still five years away, but the sultan was powerless to stop it.
The French soon expanded Oujda, which is still burgeoning as a provincial capital.