Tlemcen, in the northwest of Algeria, is sometimes called the “African Granada,” because of the richness of Medieval Islamic architecture in the city. The region has been inhabited since the Neolithic era. In the 1st century the Numidian (Amazigh) leader Takfarinas was killed in battle with the Romans who established the military outpost of Pomaria (orchards). In the 8th c. after the conquest of the Muslims, the city expanded beyond the walls of Pomaria and became known as Agadir (the wall).

From this period onward, the city was governed by a succession of Muslim dynasties. The Idrisids of Fés conquered Agadir in 788. They were replaced in command by the Umayyads of al-Andalus. In 1079, Tlemcen was conquered by the Almoravids under the leadership of Yusuf ibn Tashfin. A new town, Tagrart (the camp), was established adjacent to the existing town. The city now known as Tlemcen (the springs) was created from the union of Agadir and Tagrart. It was during this period that the Great Mosque of Tlemcen was built.

Yet even as the Great Mosque was being adorned, a new power was growing stronger to the west in modern day Morocco. The Almohad dynasty, led by the Algerian-born Abd al-Mumin bin Ali, conquered Tlemcen in 1144 and ruled for over a century. Nonetheless, their architectural contribution to the city was modest.

In the 13th century, the decline of the Almohads provided to the Abd al-Wadids (Ziyanids), led by Yaghmurasan ibn Zayyan, an opportunity to establish an independent dynasty. They ruled over central Maghreb for three consecutive centuries, during which time Tlemcen enjoyed an unprecedented era of economic and intellectual prosperity. The once secondary city became a powerful capital, and a crossroads between the Orient and Mediterranean Europe. Tlemcen frequently hosted Spanish and Italian merchants (and occasionally merchants from meridional France) who were interested in gold from the Sudan. They were installed in the walled district of al-Qaysariya. The neighborhood contained two churches serving the Christian merchants. The well-established Jewish community occupied a large area in the heart of the medina, between the Great Mosque and the Mechouar (government headquarters).

Most medieval monuments of Tlemcen date back to that time. Even the Almoravid great mosque was expanded and a large minaret constructed. The new capital was adorned with many new buildings, the most important being: the Madrasa al-Tashfinya, the mosque of Sidi Abi Hasan, and the new royal palace (Dar al-Mulk). The Abd al-Wadids (Ziyanids) reign was also a period of intense intellectual and religious activity. The famous historian Abd al-Rahman Ibn Khaldun stayed and taught at the madrasas of the city.

The brief domination of the neighboring Marinids (1337-1358) endowed the districts extra muros with several architectural gems such as the complex of Sidi Abu Madyan, the mosque at Mansura. After this period, Tlemcen never reached the same level of glory, partly because of the constant threats coming from Muslim and Christian neighboring kingdoms. This situation lasted until the city was occupied by the Ottomans, and annexed to the Regency of Algiers, in 1555. The prosperity of Tlemcen during the late Middle Ages was followed by centuries of slow decay, under the Ottoman rule.

After the weakening of the Ottoman Empire, the nineteenth and twentieth centuries were marked the French occupation and its major urban renovations that changed the morphology of the city. Nowadays, the historical center of Tlemcen is enclosed within an urban agglomeration that has grown to more than thirty times its size, with a medieval medina attempting to find its place in a city of the 21st century.