Although Roman ruins have been found at Marnia, Zenata Berbers founded Oujda in AD 944, located on the main route from Rabat and Meknès to Algeria. Traditionally, the town was fought over by the rulers of Fès, in Morocco, and Tlemcen, in Algeria. Captured by Sultan Youssef Ben Tachfine in 1206, it was a major centre for the Almohads who added to the fortifications. The Merinid ruler Abou Youssef rebuilt the city in 1297, constructing new walls and a kasbah, a mosque and a palace. Later the Ottoman Regency of Algiers gained control of the city, but Moulay Ismaïl regained it in 1687, subsequently doing much to develop the city. Though acknowledged as part of Morocco by international treaties, the city was occupied by French forces in 1844 after the decisive Battle of Isly, fought 8 km west of the city, and again in 1859. In 1903 Oujda was the centre of the uprising led by Bou Hamra, and was again taken by French forces from Algeria in 1907.
Oujda is now the most significant city in northeastern Morocco. Occupied by the French several decades before the rest of Morocco, modern education was available earlier than elsewhere in the country. Thus Oujda’s inhabitants consider themselves rather more sophisticated than many of their co-nationals. Indeed, a large number of Oujdis were active in the national independence movement. The contact with neighbouring Algeria also gives Oujda a slightly less provincial feel than one might expect (particularly apparent if coming from the Rif region). Sadly, after the border with Algeria was closed in 1995, the sharp fall in the number of visitors crossing from Algeria hit the local economy badly and has affected Oujdans’ morale. Revenues from migrant workers do something to compensate, however, and the king has visited the city several times, with a number of regional development initiatives promised.