
I thought for a long time about which city to begin my series of articles on the West of Al-Andalus. I found no place more suitable than the first city I lived in Portugal, as a student at its historic university. Founded in 1290 on the ruins of an Andalusian palace, this was an era when Islamic rule was still present in parts of the Iberian Peninsula. It was my first stop to discover Portugal and learn about its history, culture, and people.
This is Qulamriyya, in Arabic historic books or Coimbra, the city through which the pride and most cherished of Portugal's rivers flows, the Mondego River. It is the only river in the Iberian Peninsula that both rises and flows into the sea entirely within Portugal. But the city’s role wasn't limited to a riverside settlement; it was also the first capital of the modern Kingdom of Portugal.
Coimbra's location has significant geographical importance. It lies on the trade routes that have existed for centuries between the Christians in the north and the Muslims in the south, and it served as a constant point of contact between the Christian kingdoms and the borders of the territory under Muslim rule. This is why it was designated as part of the “Lower March” in Arabic historic books, where battles of raid and retreat were a prominent feature of the city's history for centuries.

Location of Coimbra and Mondego River,
made by maps.co, A. Nusair 2025

City of Coimbra from Mondego River,
A. Nusair 2021
Muslims entered Coimbra around 713 AD under the command of Abd al-Aziz ibn Musa ibn Nusair. Most sources indicate that their entry was peaceful, rather than through war, as was the case with many cities in the northwest of the Iberian Peninsula that lacked strong garrisons after the death of the Visigoth king, Roderic. After the city was opened, a new Arab governor, Abu Asim ibn Muhammad ibn al-Ahmar ibn Tarif, was appointed in 715 AD. A peace treaty was signed with the people of Coimbra, which stipulated that they would remain free to govern themselves according to their previous laws and customs, and that they would have their own ruler to handle justice and enforce rulings (Al-Darwish, Al-Alyawi, 2022).

AI-generated image depicting the leader, Abdulaziz ibn Musa ibn Nusair, entering the city of Coimbra peacefully.
Gemini pro, 2025.
The majority of the city's Muslims were from the Amazigh (Berber) tribes who settled alongside the original inhabitants. This led to a blending of races, lineages, and social components. Among these tribes that settled in Qalamriyya was the Banu Danes ibn Awjasa, to whom the Palace of Abi Danes (Alcácer do Sol) is attributed. The settlement of Berbers in fertile lands since the first Muslim conquest of Al-Andalus is evident in many cities of the Andalusian West, not just in Coimbra. To this day, the names of some regions in Portugal still bear the mark of those Berber tribes who once lived there, such as Alcoutim area near Lisbon, named after the Kutama tribe; Arzila, from the Asila tribes; and Azinhaga, from the Sanhaja tribes (Mounes, 2008).
Historical sources don't say much about what happened to the city of Coimbra immediately after the Muslim conquest, but they do mention the fortification of its defences. In 757 AD, about 42 years after its capture, the Kingdom of Galicia expanded under King Alfonso I, annexing all the lands north of the Douro River.
In response to this expansion, Andalusian leaders were forced to strengthen their cities’ defences and fortresses. During this period, Coimbra became a contested city, falling under the control of Christian kingdoms at times and into the hands of the Muslims at others.
Historical sources indicate that the Christian kingdoms seized the city for a period during the conflict that prevailed in the time of the governors of the Umayyad Caliphate in Damascus. During the reign of Emir Hisham ibn Abd al-Rahman, an army was sent under the command of Abd al-Malik ibn Mughith to reclaim it in 794 AD.
In 808 AD, during the reign of Emir Al-Hakam ibn Hisham, King Alfonso II of Galicia attacked the city, prompting Emir Al-Hakam to prepare an army to reclaim it the following year.
In 859 AD, the western regions of Al-Andalus, including Coimbra, were subjected to a Viking invasion. The Andalusian leaders responded by sending armies and vanguards to expel them from the city and other invaded areas (Al-Darwish, Al-Alyawi, 2022).
However, while all those military campaigns represented conventional warfare between regular armies, sources mention a military confrontation between the people of Coimbra and the army of the rebel Sa'dun al-Sanbaqi, who was passing through the city to assist the leader of the Muwallad rebellion, Abd al-Rahman al-Jaliqi. In his book, Al-Muqtabis, Ibn Hayyan al-Qurtubi says:
Sa'dun al-Sanbaqi and his people, along with his followers, went out to him, intending to assist him. He was with many horses, men, and archers. When he passed by the city of Qulamriyya (Coimbra), which was at that time in the hands of the Muslims and inhabited by a people from the Banu Danes of Masmuda, they were loyal to their obedience and had a prince from among them named Adans ibn Awjasa. They went out to him to block his way, and a war ensued in which men from the Banu Adans were killed, their horses were hamstrung, and then they were defeated [...] (Ibn Hayyan, 368-369)
Thus, the state of the city of Coimbra remained in flux, oscillating between the attacks of Christian kingdoms and attempts by the Andalusian state to reclaim it. This continued until the fall of the Umayyad Caliphate in Al-Andalus in 1031 AD and the rise of the Taifa states. At that time, Al-Andalus was divided into about 22 independent emirates that frequently entered conflicts with one another. Some of their emirs would invade others and seek help from Christian kingdoms to overcome their rivals. During those extraordinary events in the Andalusian West, the Banu al-Aftas took control of Coimbra and large parts of the western region, making the city of Badajoz the capital of their emirate.

Taifa Kingdoms circa 1037.
Adapted from Té y kriptonita, 2008, Wikimedia Commons (https://commons.wikimedia.org/wiki/File:Reinos_de_Taifas_en_1037.svg). Licensed under CC BY-SA 3.0.
Taking advantage of Al-Andalus's political instability, the Castilian King Fernando I decided to launch a campaign against Coimbra in 1063 AD. This led to its final fall where, Coimbra was under the governance of a leader known as Randa, who himself was under the regional authority of al-Muzaffar ibn al-Aftas, ruler of the Taifa of Badajoz. Randa had 5,000 men to defend the city from King Fernando I who marched on Coimbra with a large force and laid a fierce siege that lasted for six months. At that point, Randa secretly agreed with King Fernando I to abandon the city at night in exchange for safety for himself and his family. When morning came, the people of Coimbra found their leader gone. They offered to surrender the city in exchange for peace, but King Fernando I refused and continued the siege until starvation afflicted the people of Coimbra. Fernando's soldiers then entered the city by force, the city's defenders were taken as prisoners, and many of its people were captured (Annan, 86/2).
Historian and politician Ibn Al-Khatib also mentioned the fall of Coimbra, saying: "The enemy took the city of Qulamriyya (Coimbra) from the conquests of the Caliphate after a long siege... The Muslims there had prepared for battle, but the enemy said to them: 'How can you fight when your leader has been with us since last night?' They endured until their provisions ran out, and the city was entered by force. The men were killed, and the women and children were taken captive... The tragedy was immense" (Ibn Al-Khatib, 184/2).

AI-generated image depicting King Ferdinand I entering the city of Coimbra after a six-month siege and starvation.
Gemini Pro 2025.
After Fernando I seized the city, he made the region an independent county named Portugal, and he made Coimbra its capital. This is why it is historically recognized as the first capital of the Portugal we know today.
Al-Idrisi says in his description of Coimbra:
From Quria (Coria) to Qulamriyya (Coimbra) is four days. The city of Qulamriyya (Coimbra) is on a circular mountain, and it has a fortified wall with three gates. It is at the peak of fortification and is on the Mondego River, which flows to its west. The flow of this river continues to the sea, and at its mouth, there is the fortress of Montemor. It has mills on the river, and on it, there are many vineyards and gardens. It has many cultivated fields extending from its western side towards the sea. It has sheep and livestock, and its people are a people of power among the Romans (Meaning the Christian North kingdoms). (Al-Idrisi, Vol. 2, p. 547).

AI-generated visual representation, prompted and inspired by the specific description of the city of Qulamriyya (Coimbra) as documented by the geographer Al-Idrisi in the 12th century within his book, Nuzhat al-Mushtaq fi Ikhtiraq al-Afaq.
Gemini Pro 2025.
The Islamic city of Qulamriyya fell, but it never faded from memory. Instead, it left behind a cultural and architectural legacy that stands as a testament to the greatness of that era. Perhaps the best witness to that legacy is the old city itself, which still carries the city's name “Almedina” which means in Arabic “The city”. I remember well my first day in Coimbra, when I entered it through the famous city gate, Porta da Almedina, which, along with its ancient tower, is one of the most prominent remaining features of the old Islamic fortress.
Despite the changes and expansions over the centuries, some parts and remnants of the original defensive wall built by the Muslims are still integrated into the city’s urban fabric. These walls form the very foundation upon which later fortifications were built.
It was a surprising discovery to learn that my first rented apartment was built right alongside the ancient Islamic city walls. Senhor Antonio, my landlord, told me that a part of the city's original wall was, in fact, the TV living room wall of my apartment!

Inside Porta de Almedina.
A. Nusair 2022

A street in the old city of Coimbra "Almedina".
A. Nusair 2022
This remarkable overlap between past and present confirms that our cultural heritage isn’t confined to museums and major archaeological sites. Instead, with the passage of time, it can become a part of the most intimate details of our lives. Even the narrow, winding alleys of the old city reflect the Islamic urban planning that characterized cities during that period.
The identity of Qalamriyya (Coimbra) today is embodied in its vibrant student character. Its historic university still sits on the highest peak in the city, precisely where the old Islamic fortress (Qasbah) and palace once stood. This very structure was later transformed into a royal palace before becoming the permanent home of this esteemed academic institution.
What is truly amazing is that this history is still present in the city's architectural details. Some of the university campus buildings, including the College of Arts building where I took my master's classes, still bear clear imprints of Andalusian architecture. This touch is particularly striking in the Andalusian-style gate located opposite the National Museum, as if its beauty is telling the story of a unique convergence between the city and its Andalusian past.
The collective memory of Qalamriyya's Andalusian past is embodied in its daily details, which still carry the essence of that time. One day, I asked a friend from the city about a high peak crowned with green trees that surrounds the city. He told me it was called "the Moroccan Pine Forest," or Pinhal de Marrocos in Portuguese.
This name sparked my curiosity, and I found no more precise explanation for it than that it's a historical reference to how the Portuguese once referred to this area as "the land of the Moors," signifying their border with the Islamic world. This aligns perfectly with the city's nature, which for centuries was a permanent point of contact and a dividing line between the Christians in the north and the Muslims in the south. It is a name that has become embedded in the collective consciousness, a part of the place's identity, and a testament to a long history of encounter and conflict.



From left to right; A Moorish style arch, View of the Pinhal da Marroccos, College of Arts, UC.
A. Nusair 2022.
Like every Andalusian city with its citadel, walls, and markets, I felt compelled to search for its main mosque, which is typically found next to the Andalusian palace. Next to the university atop the hill stands the city's old cathedral, Sé Velha, which many researchers believe was built on the ruins of the grand mosque. Although the mosque was destroyed after King Fernando I entered the city, the cathedral was designed with a style that merges religious magnificence with military necessity, appearing from the outside like an impregnable fortress. This style reflects the city's nature as a borderland, which was subject to Muslim attacks even after its capture in 1064. Furthermore, the cathedral itself contains gates and arches influenced by Andalusian architecture.

The old cathedral in Coimbra.
A. Nusair, 2023.
The local awareness of this Andalusian heritage, as a part of their modern Portuguese identity, is shrouded in a certain ambiguity. While it is sometimes treated with complete disregard even by city tour guides it can also be found twisted into a distorted narrative that dismisses a great heritage as a mere temporary foreign occupation that was quickly defeated.
My brother, the writer Muhammad Nusair, aptly described this situation, saying: "Who celebrates the fall of Granada or any other Andalusian city is like one who celebrates the cutting off of his own arm" (M. Nusair, personal correspondence, 2021). This expression precisely describes that the history of Andalusian cities is a living, continuous history, and those who inhabited Coimbra were not just transient invaders. They were its people, who lived, intermarried, and blended with its residents, just like any other Iberian city.
This ambiguity surrounding the acknowledgment of the city's Islamic heritage is no less astonishing than the mysterious Arabic inscription carved on one of the old cathedral's walls, which was built on the ruins of the main mosque. The inscription reads: "I wrote this as a permanent reminder of my suffering. My hand will perish one day, but greatness will remain!" (Patrimonio Islamico Project, 2016). This is a riddle that embodies the spirit of this intertwined history. Whoever carved these words on the wall of the new monument wanted to leave a message, that true greatness does not vanish, even if the hands that created it disappeared.

The sunset over the old city of Coimbra.
A. Nusair, 2023.
References
Al-Banna, S. A. H. S. (2016, June). A reading in the history of the western Andalusian cities: The fall of the city of Qulmariyah (456 AH / 1064 CE). Kan Historical Journal (Scientific, International, Peer-Reviewed), 9(32), 138–150. https://journals.ekb.eg/article_116687.html.
Al‑Idrīsī, M. Nuzhat al‑Mushtāq fī Ikhtirāq al‑Āfāq (Vol. 2, p. 547).
Al-Ulayawi, H. J. M., & Al-Darwish, J. Y. M. (2022). The Andalusian city of Qulmariyah (Coimbra) (95–456 AH / 713–1063 CE). Kufa Arts Journal, 2022(53, Part 1), 11–44. University of Kufa – College of Arts.
Annan, T. H. The State of Islam in al-Andalus (Vol. 2, p. 86).
Database of the Islamic Heritage of Portugal, (2015-2016), Sheet | Islamic Heritage in Portugal.
Ibn Ḥayyān, Al-Muqtabas min anfāʾ al-kutub wa al-anbāʾ fī taʾrīkh mulūk al-Andalus (M. al-Tawīl, Ed., Vol. 5, pp. 368–369).
Munis, H. (1959). The dawn of al-Andalus: A study in the history of al-Andalus from the Islamic conquest to the establishment of the Umayyad state, 711–756 CE (1st ed.2008, p. 299). Cairo: Arab Printing and Publishing Company.
Té y kriptonita. (2008). Reinos de Taifas en 1037 [Map]. Wikimedia Commons. https://commons.wikimedia.org/wiki/File:Reinos_de_Taifas_en_1037.svg.