Optical Character Recognition with Tesseract: a Tutorial for Medievalists

This tutorial is for those of you who want to learn some basic programming in Python for the digital humanities, but also for those who have never programmed or may become filled with terror at the sight of a single line of code (trust me, I know the feeling!). At the end of this guide, you should know how to perform optical character recognition (OCR) to make a pdf searchable. For this, we are going to use โ€œocrmypdfโ€, a Tesseract-based Python package with wonderful capabilities. Everything will be done online from your web browser, so donโ€™t worry, you will not have to install anything on your computer!ย 

I have tried to keep the tutorial very simple and straight to the point, at the cost of occasionally sacrificing some useful and important explanations about the code. For that, I profusely apologize to my colleagues in the department of computer science. Please, do not send the Spanish Inquisition.

The name “Python” is a tribute to Monty Python (please excuse the poor joke).

Why Tesseract and ocrmypdf?

Some of you may be familiar with, or even regular users of the OCR function provided by Adobe Acrobat DC pro. The ctrl+f function is one of the simplest and most efficient tools to support analysis of text and research. Acrobat DC is a powerful and very easy to use software, but this comes at a price. First, Acrobat works only with a handful of common modern languages such as English, French, German or Japanese. Tesseract on the other hand can recognize characters from a broad variety of modern and classical languages, including, but not limited to, Armenian, Classical Arabic, Classical Greek, Syriac, and Old Georgian, to name only a few. Second, Tesseract is a free, and open-source software, presenting a more cost-efficient option compared to other expensive commercial options and I am sure many of you would rather settle for the free but equally powerful alternative.

First, go to https://colab.research.google.com/

This is a free Jupyter notebook that will save your data on your personal google drive. Just remember to hit the save button before closing the page.      

Open a new notebook and sign up with a Gmail address. You will want to use your @nd.edu address but any personal google account will work too.

As a first step, we need to download ocrmypdf, and all its dependencies. To do so, simply type the following lines. The first will download the python package ocrmypdf, while the other lines will deal with the dependencies. For those of you new to coding, you will learn the first rule of coding: any errors in spelling, indentation and so forth can break your code. Be careful!

When the above lines have been written, run the cell by pressing ctrl+enter or press the button in the upper left corner. The download process should take around a minute. Once the download is complete, you should see a little green tick next to the upper left arrow.

Once the package and its dependencies have been downloaded, we will need to import โ€œocrmypdfโ€ so that we can put it to work. Add a line of code to your colab sheet by clicking on + Code and write the following code:

Next, add a copy of your scanned pdf to the “files/content” folder  on the left side of your screen (or any other folder of your choice, you will just have to note its path somewhere). In our case, we are going to work with the first page of an article on the Mevlevi Sufi order published by the Byzantinist Speros Vryonis Junior.

In a new cell, enter the following lines of code (beware, the underscores are double underscores!).

Here, the name on the left should be that of the file you want to ocr (or its path if put in another folder), the one on the right should be that of the new, postprocessed file. The code uses the exact name of the file, โ€˜Vryonis_Article.pdfโ€™. You can keep the exact same name if you want the new file to overwrite the original one. In my case, my code is directing ocrmypdf to create a new file: โ€˜Vryonis_Article_OCR.pdfโ€™. Once generated, the post-processed article should appear in the same folder.

If you ever get an error, simply restart the runtime before running the cell again.

Et voila! You can now search your pdf with ctrl+F or copy and paste any sentence you want.

But this is not the most exciting part of this tutorial, and we may want to spice things up a little bit. Tesseract is very good at OCRing (yes, this is a verb, at least according to the WordSense dictionary) non-Latin scripts, but the process is a bit more involved. As an example, letโ€™s take a page from the Masฤlik al-abแนฃฤr fฤซ mamฤlik al-amแนฃฤr written in the 14th century by the Syrian polymath al-สฟUmarฤซ.

For this, you need first to download the Arabic trained data at https://github.com/tesseract-ocr/tessdata/tree/main/script

Then move the downloaded file to the following folder /usr/share/tesseract-ocr/4.00/tessdata

The process is the same as before, simply change the language code to that of the language you just added, in our case โ€œaraโ€. The various language codes can be found here: (https://tesseract-ocr.github.io/tessdoc/Data-Files-in-different-versions.html)

ูˆู‡ูˆ ุฃุซุฑู‰ ุงู„ู…ู…ุงู„ูƒ ุจู„ุง ุงุญุชุดุงู… ุฎู„ุง ุฃู†ู‡ ุจูƒุซุฑุฉ

And here we are. Those who can read Arabic will notice that the result is extremely impressive. This, however, is a rather neat scan and Arabic is often difficult to properly OCR because of the cursive nature of the script. If the quality of your scan is poor, you may also be able to clean it with Python beforehand for a better result. I may develop this point further in another post.

Beyond Arabic, Tesseract works very well with other non-cursive Semitic scripts, and you may get excellent results with Hebrew for example. Here is a last example from a Syriac Bible.

If you have any questions or comments about this guide, feel free to contact me.

Romain Thurin
PhD Candidate
Medieval Institute

The Nasrid College: Knowledge and Power in a Medieval Islamic City-State

Today’s blog continues from last week’s discussion of the Nasrid College and the multicultural exchange it fostered in Medieval Iberia by shifting the focus to the intellectual and political.

In Muแธฅarram 750/April 1349, the Nasrid College, located directly across from the former Great Mosque of Granada (today the cathedral) and near the main market, was completed.[1] It reflected the intersection between knowledge and power, cosmopolitanism and learning, in Nasrid Granada. Although the Nasrid College was certainly the most significant example of an Andalusi madrasah during the Middle Ages, the Granadan scholar-statesman and historian Lisฤn al-Dฤซn ibn al-Khaแนญฤซb (d. 1374) states that โ€œthe admirable college was constructed during the reign of Yลซsuf and was the most illustrious of all the colleges in his capital,โ€ indicating that there may have been other such colleges in the kingdom.[2] The Nasrid College sought to establish the preeminence of the Granada as a leading intellectual and cultural center in the Islamic West. Its prominence reflected the transformation of Granada from an embattled frontier polity into a major center of learning in the Islamic West, competing with other intellectual centers such as Fez, Tlemcen, Tunis, Marrakesh and Meknes. Although law, Arabic grammar, and theology constituted the integral components of the curriculum, the subjects taught at the Nasrid College encompassed both the โ€œtraditional sciencesโ€ (al-โ€˜ulลซm al-naqliyyah) as well as the โ€œphilosophical sciencesโ€ (al-โ€˜ulลซm al-โ€˜aqliyyah), and included jurisprudence, logic, medicine, astronomy, philosophy, mathematics, arithmetic, and geometry. Some of these subjects would also be studied with professors from the Nasrid College in other spaces in Granada, including the home and chancery. The students and teachers at the Nasrid College included some of the greatest luminaries from al-Andalus as well as North Africa during the 14th and 15th centuries. The Nasrid College contained a significant library that housed many of the most important works produced in the late medieval Islamic West, as well as many books from across the Islamic world. According to a note by the 15th-century Andalusi scholar Abลซ โ€˜Abd Allฤh Muแธฅammad b. al-แธคaddฤd al-Wฤdฤซ ฤ€shฤซ, for example, an ornamented and calligraphic manuscript of the monumental โ€œComprehensive History of Granadaโ€ (al-Ihฤแนญah fฤซ Akhbฤr Gharnฤแนญah, authored by Ibn al-Khaแนญฤซb) was deposited in the library of Nasrid College during the reign of Muแธฅammad V (r. 1354-1359, 1362-1391), where it remained as an endowment (taแธฅbฤซs), and was consulted by subsequent generations of scholars.

Details of the miแธฅrฤb of the Nasrid College. Photo by Mohamad Ballan.

Following the Iberian Christian conquest of Granada in 1492, the Nasrid College survived largely intact, until much of it was demolished during the early 18th century to make way for a new Baroque structure.  Although only the prayer niche (miแธฅrฤb) and the Oratory of the Following the Iberian Christian conquest of Granada in 1492, the Nasrid College survived largely intact, until much of it was demolished during the early 18th century to make way for a new Baroque structure.  Although only the prayer niche (miแธฅrฤb) and the Oratory of the Nasrid College survives to the present day, recent studies by historians and archaeologists have sought to reconstruct the original structure, which included a monumental gate and pool.

Bilal Sar and Luca Mattei. โ€œLa Madraza Yusufiyya en รฉpoca andalusรญ: un diรกlogo entre las fuentes รกrabes escritas y arqueolรณgicas,โ€ Arqueologรญa y Territorio Medieval 16 (2009), p. 73.

The survival of several contemporary Marinid colleges in North Africa, including those in Fez, Meknes, and Salรฉ built during the 1340s and 1350s, may also provide an idea of both the scale and style of the Nasrid College.

College of Abลซ al-แธคasan โ€˜Alฤซ in Salรฉ, Morocco, completed around 1341. Source: Wikimedia.
Miแธฅrฤb, or prayer niche, of the College of Abลซ al-แธคasan โ€˜Alฤซ in Salรฉ, Morocco. Source: Wikimedia.
Bou Inania Madrasa, Fez. Photo by Mohamad Ballan.
Bou Inania Madrasa, Fez. Photo by Mohamad Ballan.
Bou Inania Madrasa, Fez. Photo by Mohamad Ballan.
Bou Inania Madrasa in Meknes, built in the 1350s. Photo by Mohamad Ballan.
Bou Inania Madrasa in Meknes, built in the 1350s. Photo by Mohamad Ballan.
Bou Inania Madrasa in Meknes, built in the 1350s. Photo by Mohamad Ballan.

Like the monumental colleges constructed by Marinid rulers in North Africa, especially Abลซ al-แธคasan โ€˜Alฤซ (r. 1331โ€“1348) and Abลซ โ€˜Inฤn (1348โ€“1358), this structure was intended to c

Like the monumental colleges constructed by Marinid rulers in North Africa, especially Abลซ al-แธคasan โ€˜Alฤซ (r. 1331โ€“1348) and Abลซ โ€˜Inฤn (1348โ€“1358), this structure was intended to celebrate the elaborate wealth and power of the sovereign, while proclaiming his commitment to knowledge. There are remarkable architectural and artistic similarities between the Nasrid College and other royal monuments in Granada, including the Alhambra, as well as with Marinid colleges in North Africa, particularly the College of Abลซ al-แธคasan โ€˜Alฤซ in Salรฉ, which was built several years earlier. Similar to the Marinid colleges, the verses inscribed on the walls of the Nasrid College, which were preserved in medieval and early modern texts, were authored by leading scholars, litterateurs and courtiers. These celebrated the patronage of learning by Yลซsuf I, and illustrate the interrelationship between royal power and learned elites in the Nasrid kingdom.[3]

Nasrid dynastic sloganโ€”โ€œThere is no Conqueror except Godโ€ (wa lฤ ghฤlib illฤ Llฤh)โ€”inscribed on the prayer niche of the Nasrid College. Photo by Mohamad Ballan.
Another instance of the Nasrid dynastic sloganโ€”โ€œThere is no Conqueror except Godโ€ (wa lฤ ghฤlib illฤ Llฤh)โ€”inscribed on the prayer niche of the Nasrid College. Photo by Mohamad Ballan.

In addition to reflecting a shared idiom of sovereignty and learned kingship across both Islamic Spain and North Africa, the similarities between these colleges, which were built within several years of one another, provides an important indication of the cultural and artistic exchange across the Islamic West. It also illustrates the role of interregional connections in strengthening the ties of affiliation and the diffusion of institutions between Iberia and North Africa during this period. Itinerant scholars, administrators and artisans served as cultural intermediaries and conduits for the exchange of ideas and institutions between Nasrid Granada and Marinid Morocco. The Nasrid College was merely one illustration of this broader phenomenon.

Some of the epigraphic poetry [formerly] adorning the gates of the madrasa, extolling the virtues of knowledge and learning. Source https://revistaseug.ugr.es/index.php/meaharabe/article/view/14938/12931.
Some of the epigraphic poetry [formerly] adorning the gates of the madrasa, extolling the virtues of knowledge and learning. Source https://revistaseug.ugr.es/index.php/meaharabe/article/view/14938/12931.

While the College came to be known in later sources as al-Madrasa al-Yลซsufiyya or โ€œThe College of Yลซsuf,โ€ and came to be associated with the name of Yลซsuf I (r. 1333-1354), it was in fact the creation of Abลซ Nuโ€˜aym Riแธwฤn al-Naแนฃrฤซ (d. 1359), this Nasrid sovereignโ€™s royal chamberlain.[4] Abลซ Nuโ€˜aym Riแธwฤn was a prominent example of a particular class of Nasrid society that modern scholarship has referred to as โ€œrenegades,โ€ enslaved people and freedmen and their descendants who were an integral part of Granadaโ€™s population. Riแธwฤn was born into a Castilian Christian family in Calzada de Calatrava before being enslaved as a child during a Nasrid raid in the late 13th century. Following his captivity, he was converted to Islam and manumitted, received an education in the Nasrid court, and eventually appointed to leading positions of executive authority, including royal chamberlain, chief minister and commander of the military. The rise to prominence of Riแธwฤn during this period is also corroborated by contemporary Castilian and Aragonese sources, including the Crรณnica de Alfonso XI, which describes him as โ€œa Muslim knight known as Reduan, the son of a Christian man and Christian woman, whom the king of Granada trusted immensely (un cavallero moro que dezian Reduan que fuera fijo de christiano e de christiana e era ome quien fiava mucho el rey).โ€[5] There is substantial evidence that Riแธwฤn served as an intermediary with the Iberian Christian kingdoms, and corresponded directly with Alfonso IV (r. 1327โ€“1336) and Pedro IV (r. 1336โ€“1387) of Aragรณn in order to secure a peace treaty between the Nasrids and Aragรณn. In these documents, four of which have been preserved in the Archivo de la Corona de Aragรณn, Riแธwฤn consistently refers to himself as โ€œRiแธwฤn, son of Godโ€™s servant, the chief minister of the Sultanโ€ (Riแธwฤn ibn โ€˜Abd Allฤh wazฤซr al-sulแนญฤn).

Signature of Abลซ Nuโ€˜aym Riแธwฤn on surviving document produced by the Nasrid chancery during the 1330s.
Signature of Abลซ Nuโ€˜aym Riแธwฤn on surviving document produced by the Nasrid chancery during the 1330s.
Signature of Abลซ Nuโ€˜aym Riแธwฤn on surviving document produced by the Nasrid chancery during the 1330s

Alongside his prominent role in politics, diplomacy and administration, Riแธwฤn was also among the most important patrons of scholars and learning within Nasrid Granada. According to the Granadan scholar-statesman Ibn al-Khaแนญฤซb, one of the beneficiaries of Riแธwฤnโ€™s patronage, the latter invested considerable funds into a pious endowment (waqf),[6] which formed the foundation of the Collegeโ€™s existence (and stipends for its students), personally financed its decoration and ornamentation, and linked it with the urban system of waterworks to ensure it had a steady supply of water from the river.[7] Such details enable us to appreciate the role of the endowment, or waqf (pl. awqฤf), as one of the avenues in which scholar-officials and palace functionaries, particularly upwardly-mobile ones, invested their wealth to leave their imprint on the kingdom. The construction of the Nasrid College, in addition to fortifications and mosques by Riแธwฤn, demonstrates how his own personal wealth, accumulated over decades while in royal service, played an important role in developing the urban space of Granada. The centrality of a Castilian-born freedmen in the emergence of Granadaโ€™s most important institutions of learning illustrates the ways in which the Nasrid College embodied the intersection of traditions of learning, notions of sovereignty and borderland realities in Nasrid Granada.

Fragments of the foundation inscription of the Nasrid College. Source: andalfarad.com.
Details of the miแธฅrฤb of the Nasrid College. Photo by Mohamad Ballan.

This concerted program of urban expansion and elaborate construction in Granada during the 14th century was accomplished through the close collaboration between the secretarial class, nobles, artisans, and craftsmen. The establishment of the Nasrid College and its transformation into one of the most important institutions of learning in Granada was made possible by the close relationship between the sovereign, leading statesmen such as Riแธwฤn and the various secretaries and functionaries within the Nasrid chancery. The construction of the Nasrid College and the circumstances surrounding it demonstrate that, far from being a period of โ€œintellectual decline,โ€ the 14th and 15th centuries in the Islamic West witnessed the emergence of a rigorous scholarly culture that produced brilliant individuals and prolific scholars. The Nasrid College, which has now become the subject of numerous interdisciplinary studies that have included historians, philologists, and archaeologists, has the potential to shed light on this larger cultural renaissance.

Ceiling of the Oratory of the Nasrid College, Granada. Source: flickr.com

Mohamad Ballan
Mellon Fellow, Medieval Institute
University of Notre Dame (2021-2022)
Assistant Professor of History
Stony Brook University

Further Reading

Abu Rihab, Muhammad al-Sayyid Muhammad. al-Madฤris al-Maghribฤซyah fฤซ al-สปaแนฃr al-Marฤซnฤซ : dirฤsah ฤthฤrฤซyah miสปmฤrฤซyah. Alexandria: Dฤr al-Wafฤสผ li-Dunyฤ al-แนฌibฤสปah wa-al-Nashr, 2011.

Aciรฉn Almansa, Manuel. โ€œInscripciรณn de la portada de la Madraza.โ€ Arte Islรกmico en Granada, pp. 337-339. Granada, 1995.

Al-Shahiri, Muzahim Allawi. al-แธคaแธฤrah al-สปArabฤซyah al-Islฤmฤซyah fฤซ al-Maghrib : al-สปaแนฃr al-Marฤซnฤซ. Amman: Markaz al-Kitฤb al-Akฤdฤซmฤซ, 2012

Bennison, Amira K ed. The Articulation of Power in Medieval Iberia and the Maghrib. Oxford: Oxford University Press, 2014.

Buresi, Pascal and Mehdi Ghouirgate. Histoire du Maghreb medieval (XIeโ€“XVe siรจcle). Paris: Armand Colin, 2013

Cabanelas, Dario. โ€œLa Madraza รกrabe de Granada y su suerte en รฉpoca cristiana,โ€ Cuadernos de la Alhambra, nยบ 24 (1988): 29โ€“54

________. โ€œInscripciรณn poรฉtica de la antigua madraza granadinaโ€ Miscelรกnea de Estudios รrabes y Hebraicos Secciรณn รrabe-Islam 26 (1977): 7-26.

Ferhat, Halima. โ€œSouverains, saints, fuqahฤโ€™.โ€ al-Qantara 18 (1996): 375โ€“390

Harvey, Leonard Patrick. Islamic Spain, 1250โ€“1500. Chicago, University of Chicago Press, 1990

Le Tourneau, Roger. Fez in the Age of the Marinides. University of Oklahoma Press, 1961

Makdisi, George. โ€œThe Madrasa in Spainโ€ http://www.persee.fr/web/revues/home/prescript/article/remmm_0035-1474_1973_num_15_1_1235

Mattei, Luca. โ€œEstudio de la Madraza de Granada a partir del registro arqueolรณgico y de las metodologรญas utilizadas en la intervenciรณn de 2006.โ€ Arqueologรญa y Territorio 5 (2008): 181-192

Prado Garcรญa, Celia. โ€œLos estudios superiores en las madrazas de Murcia y Granada. Un estado de la cuestiรณn.โ€ Murgetana 139 (2018): 9-21.

Rodrรญguez-Mediano, Fernando. โ€œThe Post-Almohad Dynasties in al-Andalus and the Maghrib.โ€ In The New Cambridge History of Islam, Volume II: The Western Islamic World, Eleventh to Eighteenth Centuries, edited by Maribel Fierro, pp. 106โ€“143. Cambridge: Cambridge University Press, 2012.

Rubiera Mata, Marรญa Jesรบs. โ€œDatos sobre una โ€˜Madrasaโ€™ en Mรกlaga anterior a la Naแนฃrรญ de Granada.โ€ Al-Andalus 35 (1970): 223โ€“226

Sarr, Bilal and Luca Mattei. โ€œLa Madraza Yusufiyya en รฉpoca andalusรญ: un diรกlogo entre las fuentes รกrabes escritas y arqueolรณgicas.โ€ Arqueologรญa y Territorio Medieval 16 (2009): 53โ€“74.

Secall, M. Isabel Calero.  โ€œRulers and Qฤdฤซs: Their Relationship during the Naแนฃrid Kingdom.โ€ Islamic Law and Society 7 (2000): 235โ€“255

Seco de Lucena Paredes, Luis. โ€œEl แธคฤลทib Riแธwฤn, la madraza de Granada y las murallas del Albayzรญn.โ€ Al-Andalus 21 (1956): 285โ€“296.

Simon, Elisa. โ€œLa Madraza Nazari: Un centro del saber en la Granada de Yusuf I.โ€ https://andalfarad.com/la-madraza-nazari/


[1] The most important scholarship about the Nasrid College includes La Madraza: pasado, presente y futuro (Granada: Editorial Universidad de Granada, 2007), eds. Rafael Lรณpez Guzmรกn and Marรญa Elena Dรญez Jorge; La Madraza de Yusuf I y la ciudad de Granada: anรกlisis a partir de la arqueologรญa (Granada: Editorial Universidad de Granada, 2015), eds. Antonio Malpica Cuello and Luca Mattei.

[2] Ibn al-Khatฤซb, al-Lamแธฅa al-Badriyya fฤซ al-Dawla al-Naแนฃriyya (Kuwait, 2013), p. 153. For a discussion of an earlier college built in the Nasrid kingdom, see Marรญa Jesรบs Rubiera Mata, โ€œDatos sobre una โ€˜Madrasaโ€™ en Mรกlaga anterior a la Naแนฃrรญ de Granada,โ€ Al-Andalus 35 (1970), pp. 223โ€“226.

[3]Darรญo Cabanelas, โ€œInscripciรณn poรฉtica de la Antigua madraza granadina,โ€ Miscelรกnea de Estudios รrabes y Hebraicos, Secciรณn รrabe-Islam 26 (1977), pp. 7โ€“26.

[4] For an overview of this figureโ€™s life and career, see Luis Seco de Lucena Paredes, โ€œEl แธคฤลทib Riแธwฤn, la madraza de Granada y las murallas del Albayzรญn,โ€ Al-Andalus 21 (1956), 285โ€“296.

[5] Fernรกn Sรกnchez de Valldolid, Crรณnica de Alfonso XI, BN MS 829, ff. 190rโ€“190v.

[6] For a comprehensive study of awqฤf in al-Andalus, see Alejandro Garcรญa-Sanjรบan, Till God inherits the Earth: Islamic Pious Endowments in al-Andalus (9-15th centuries) (Leiden: Brill, 2007).

[7] Ibn al-Khaแนญฤซb, al-Iแธฅฤแนญa, 1: 508โ€“509.

The Nasrid College: Trade and Multiculturalism in a Medieval Islamic City-State

For Spain and North Africa, the late medieval period (ca. 1250-1500) was a tumultuous era that was characterized by political turmoil and mass violence. It was also the period that witnessed one of the greatest bursts of cultural efflorescence, intellectual creativity and administrative-political innovation in the region. During the fourteenth and fifteenth centuries, the cities of Toledo, Seville, Granada, Fez and Tunis, not unlike the city-states of Renaissance Italy during the same period, produced some of the most remarkable scholars and intellectuals in the history of the Western Mediterranean, despite the numerous challenges of the era. It was also the period that witnessed the rise of some of the most remarkable pieces of architecture in the region. One of the most iconic monuments associated with this period is the Alhambra, the royal and administrative center of the Nasrid kingdom of Granada between the 13th and 15th centuries. Since the Middle Ages, there has been no shortage of interest in this palace-fortress complex, its monumental scale and its exquisite craftsmanship.[1]

Alhambra, Granada. Source: Wikimedia.

The history of another architectural and cultural gem from 14th-century Granada, which remains relative little-known beyond a small circle of specialists, is concealed behind an 18th-century Baroque faรงade behind the Great Cathedral of Granada: the Nasrid College (al-madrasah al-naแนฃriyyah), constructed in April 1349.

Baroque exterior of Palacio de la Madraza, Granada. Photo by Mohamad Ballan.
Oratory of the Nasrid College. Source: caminandogranada.com.
Oratory of the Nasrid College. Photo by Mohamad Ballan.

The Nasrid College was a rare example of a madrasah constructed in medieval al-Andalus (Muslim Iberia).[2] This structure, which was only excavated and restored over the past several decades and finally opened to the public in 2011, provides important insights into the intellectual, social and political history of Nasrid Granada during the 14th century. This short post seeks to provide an overview of the emergence of the Nasrid College, with particular attention to the cultural, political and intellectual context in which it emerged.

Nasrid Granada, the last surviving Muslim polity in medieval Iberia, was a borderland city-state entrenched in the farthest reaches of the Islamic world, between Europe and North Africa, yet closely connected and integrated within both Latin Christendom and the Islamic world. The Muslim-Christian borderlands during this period were characterized by intermittent frontier warfare and shifting alliances between Nasrid and Castilian rulers, the emergence of a bilingual nobility (conversant in Romance as well as Arabic), and the permeability of the frontier, which facilitated the passage and migration of mercenaries and merchants, renegades and refugees, scholars and slaves between the Islamic world and Latin Christendom.

Medieval Iberia, ca. 1470. Source: mapsontheweb.zoom
Nasrid Kingdom of Granada, 1238-1492. Source Wikimedia.

Over the past several decades, there has been a substantial body of scholarship that has treated various aspects of the political, intellectual, cultural and social history of Nasrid Granada demonstrating the various ways that this polity and its inhabitants were shaped by this broader borderland context.[3] By the 14th century, the Kingdom of Granada encompassed one of the most urban and diverse populations in late medieval Iberia. The mass migration of thousands of Andalusi Muslims to Granada in the wake of the Castilian, Portuguese and Aragonese conquest of Islamic Spain transformed it from a regional urban center into a thriving metropolis and one of the largest cities in the western Islamic world.

Recent studies have challenged the conventional narrative of Nasrid decline and isolation by illustrating Granadaโ€™s integration into the extensive intellectual, mercantile, commercial and diplomatic networks that characterized the late medieval Mediterranean world. The various communities of Christian merchants and mercenaries, particularly from Genoa, Castile and Aragรณn, [4] that were established across the Nasrid kingdom between the 13th and 15th centuries often served as cultural intermediaries and conduits for the circulation and exchange of ideas between Latin Christendom and the Islamic West. The population of Nasrid Granada was characterized by social and cultural heterogeneity. The Andalusi Muslims who comprised the majority of the kingdomโ€™s roughly 250,000โ€“300,000 inhabitants were themselves descendants of communities from diverse geographic, social and ethnic backgrounds from across the Iberian Peninsula (and beyond), the consequence of centuries of acculturation, conversion and migration in the region. Granada was also home to various Jewish communities, and significant contingents of North African โ€œholy warriorsโ€ (ghuzฤh) and their families, who played an important role in Nasrid society and politics.


[1] Olivia Remie Constable, Housing the Stranger in the Mediterranean World: Lodging, Trade, and Travel in Late Antiquity and the Middle Ages (Cambridge, 2003), 248-249, 297-298, 302-303; Roser Salicrรบ i Lluch, โ€œThe Catalano-Aragonese Commercial Presence in the Sultanate of Granada during the Reign of Alfonso the Magnanimous,โ€ Journal of Medieval History 27 (2001), 289-312.

Nasrid Granada as depicted on the Catalan Atlas, 1375. BnF Espagnol 30.
Nasrid Granada as depicted on the Catalan Atlas, 1375. BnF Espagnol 30.

The Nasrid College was shaped by this dynamic history of cosmopolitanism, cultural exchange and transregional connections. Unlike the medieval Middle East, where colleges were ubiquitous, particularly from the 11th century onwards, the institution was a rather late arrival in medieval Islamic Spain and North Africa. It was the mosque, the home and the chancery that functioned as the most important spaces of learning prior to the 14th century. The first madrasas (colleges) in the Islamic West only began to be constructed by the Marinids during the late 13th century.[5] The Marinid dynasty in North Africa was particularly distinguished by a dedication to the construction of colleges during the late 13th and 14th centuries. The emergence of the college in late medieval Islamic West reflected the increased collaboration and intersection between learned elites, urban notables and ruling elites. From the inception of the Nasrid kingdom of Granada, royal and noble elites worked closely with the urban scholarly and administrative classes whom they relied upon to govern and rule. These elites patronized various intellectual disciplines and genres of writing, ranging from philosophy and medicine to historiography, jurisprudence, and literature. The second Nasrid ruler, Muแธฅammad II (r. 1273โ€“1302), was even known as โ€œthe learnedโ€ (al-faqฤซh)[6] for his patronage, promotion and participation in the Islamic legal, theological and intellectual sciences. It was within a broader cultural milieu in which learning and knowledge served not only a practical purpose in royal courts, but came to constitute a central component of political legitimation, that the Nasrid College, one of the most important institutions in Nasrid history was constructed. In Muแธฅarram 750/April 1349, the Nasrid College, located directly across from the former Great Mosque of Granada (today the cathedral) and near the main market, was completed.[7]

Oratory of the Nasrid College, Granada. Source: Wikipedia Commons.
Ceiling of the Oratory of the Nasrid College. Photo by the Mohamad Ballan.

Return next week to continue reading about the Nasrid College and how it fostered knowledge and power in medieval Granada!

Mohamad Ballan
Mellon Fellow, Medieval Institute
University of Notre Dame (2021-2022)
Assistant Professor of History
Stony Brook University

Further Reading

Abu Rihab, Muhammad al-Sayyid Muhammad. al-Madฤris al-Maghribฤซyah fฤซ al-สปaแนฃr al-Marฤซnฤซ : dirฤsah ฤthฤrฤซyah miสปmฤrฤซyah. Alexandria: Dฤr al-Wafฤสผ li-Dunyฤ al-แนฌibฤสปah wa-al-Nashr, 2011.

Aciรฉn Almansa, Manuel. โ€œInscripciรณn de la portada de la Madraza.โ€ Arte Islรกmico en Granada, pp. 337-339. Granada, 1995.

Al-Shahiri, Muzahim Allawi. al-แธคaแธฤrah al-สปArabฤซyah al-Islฤmฤซyah fฤซ al-Maghrib : al-สปaแนฃr al-Marฤซnฤซ. Amman: Markaz al-Kitฤb al-Akฤdฤซmฤซ, 2012

Bennison, Amira K ed. The Articulation of Power in Medieval Iberia and the Maghrib. Oxford: Oxford University Press, 2014.

Buresi, Pascal and Mehdi Ghouirgate. Histoire du Maghreb medieval (XIeโ€“XVe siรจcle). Paris: Armand Colin, 2013

Cabanelas, Dario. โ€œLa Madraza รกrabe de Granada y su suerte en รฉpoca cristiana,โ€ Cuadernos de la Alhambra, nยบ 24 (1988): 29โ€“54

________. โ€œInscripciรณn poรฉtica de la antigua madraza granadinaโ€ Miscelรกnea de Estudios รrabes y Hebraicos Secciรณn รrabe-Islam 26 (1977): 7-26.

Ferhat, Halima. โ€œSouverains, saints, fuqahฤโ€™.โ€ al-Qantara 18 (1996): 375โ€“390

Harvey, Leonard Patrick. Islamic Spain, 1250โ€“1500. Chicago, University of Chicago Press, 1990

Le Tourneau, Roger. Fez in the Age of the Marinides. University of Oklahoma Press, 1961

Makdisi, George. โ€œThe Madrasa in Spainโ€ http://www.persee.fr/web/revues/home/prescript/article/remmm_0035-1474_1973_num_15_1_1235

Mattei, Luca. โ€œEstudio de la Madraza de Granada a partir del registro arqueolรณgico y de las metodologรญas utilizadas en la intervenciรณn de 2006.โ€ Arqueologรญa y Territorio 5 (2008): 181-192

Prado Garcรญa, Celia. โ€œLos estudios superiores en las madrazas de Murcia y Granada. Un estado de la cuestiรณn.โ€ Murgetana 139 (2018): 9-21.

Rodrรญguez-Mediano, Fernando. โ€œThe Post-Almohad Dynasties in al-Andalus and the Maghrib.โ€ In The New Cambridge History of Islam, Volume II: The Western Islamic World, Eleventh to Eighteenth Centuries, edited by Maribel Fierro, pp. 106โ€“143. Cambridge: Cambridge University Press, 2012.

Rubiera Mata, Marรญa Jesรบs. โ€œDatos sobre una โ€˜Madrasaโ€™ en Mรกlaga anterior a la Naแนฃrรญ de Granada.โ€ Al-Andalus 35 (1970): 223โ€“226

Sarr, Bilal and Luca Mattei. โ€œLa Madraza Yusufiyya en รฉpoca andalusรญ: un diรกlogo entre las fuentes รกrabes escritas y arqueolรณgicas.โ€ Arqueologรญa y Territorio Medieval 16 (2009): 53โ€“74.

Secall, M. Isabel Calero.  โ€œRulers and Qฤdฤซs: Their Relationship during the Naแนฃrid Kingdom.โ€ Islamic Law and Society 7 (2000): 235โ€“255

Seco de Lucena Paredes, Luis. โ€œEl แธคฤลทib Riแธwฤn, la madraza de Granada y las murallas del Albayzรญn.โ€ Al-Andalus 21 (1956): 285โ€“296.

Simon, Elisa. โ€œLa Madraza Nazari: Un centro del saber en la Granada de Yusuf I.โ€ https://andalfarad.com/la-madraza-nazari/


[1] For some significant studies of the Alhambra, see Olga Bush, Reframing the Alhambra: Architecture, Poetry, Textiles and Court Ceremonial (Edinburgh: Edinburgh University Press, 2018); Antonio Malpica Cuello, La Alhambra: Ciudad Palatina Nazarรญ (Malaga: Editorial Sarria, 2007); Antonio Fernรกndez-Puertas, La fachada del Palacio de Comares (Granada: Patronato de la Alhambra, 1980); Oleg Grabar, The Alhambra (Cambridge, Mass.: Harvard University Press, 1978); Antonio Gallego y Burรญn, La Alhambra (Granada: Editorial Comares, 1963); Basilio Pavon Maldonado, Estudios sobre la Alhambra (Granada: Patronato de La Alhambra, 1975); Leopoldo Torres Balbรกs, La Alhambra y el Generalife (Madrid: Editorial Plus-Ultra, 1953).

[2] For a general discussion of this question, see George Makdisi, โ€œThe Madrasa in Spain,โ€ Revue de l’Occident musulman et de la Mรฉditerranรฉe 15โ€“16 (1973), pp. 153โ€“158 http://www.persee.fr/web/revues/home/prescript/article/remmm_0035-1474_1973_num_15_1_1235

[3] For an important recent contribution, which reflects the most up-to-date scholarship on Nasrid Granada, see Adela Fรกbregas, ed., The Nasrid Kingdom of Granada between East and West (Leiden, 2021). A significant historiographical overview and the current state of the field can be found in Antonio Pelรกez Rovira, โ€œBalance historiogrรกfico del emirato nazarรญ de Granada (siglos XIII-XV) desde los estudios sobre al-Andalus: instituciones, sociedad y economรญa,โ€ Reti Medievali Rivista 9 (2008), 1โ€“48.

[4] Olivia Remie Constable, Housing the Stranger in the Mediterranean World: Lodging, Trade, and Travel in Late Antiquity and the Middle Ages (Cambridge, 2003), 248-249, 297-298, 302-303; Roser Salicrรบ i Lluch, โ€œThe Catalano-Aragonese Commercial Presence in the Sultanate of Granada during the Reign of Alfonso the Magnanimous,โ€ Journal of Medieval History 27 (2001), 289-312.

[5] For an excellent recent study of this development see Riyaz Mansur Latif, Ornate Visions of Knowledge and Power: Formation of Marinid Madrasas in Maghrib al-Aqsฤ (University of Minnesota PhD Book, 2011). Also, see Muhammad Abu Rihab, al-Madฤris al-Maghribฤซya fฤซ al-สปaแนฃr al-Marฤซnฤซ : dirฤsa ฤthฤrฤซya miสปmฤrฤซya (Alexandria: Dฤr al-Wafฤสผ li-Dunyฤ al-แนฌibฤสปa wa-al-Nashr, 2011).

[6] This was an epithet he shared with his exact contemporary, Alfonso X of Castile-Leรณn (r. 1252-1282), known as โ€œthe Learnedโ€ (El Sabio).

[7] The most important scholarship about the Nasrid College includes La Madraza: pasado, presente y futuro (Granada: Editorial Universidad de Granada, 2007), eds. Rafael Lรณpez Guzmรกn and Marรญa Elena Dรญez Jorge; La Madraza de Yusuf I y la ciudad de Granada: anรกlisis a partir de la arqueologรญa (Granada: Editorial Universidad de Granada, 2015), eds. Antonio Malpica Cuello and Luca Mattei.