Notes on the 14th-century Ya'qubiyya Complex in Tlemcen, Algeria

This paper discusses the Islamic funerary complex in central Tlemcen, Algeria, built in 1362–1363, recorded in historical sources as "the Ya'qubiyya", and today known by the name of Sidi Ibrahim al-Masmudi. During the late middle ages, the north-west corner of Africa was shared between two related Berber dynasties, the Marinids of Fez (Morocco) and the Zayyanids of Tlemcen, who were in constant conflict with one another. The Ya'qubiyya complex was erected by the Zayyanid sultan Abu Hammu Musa II (r. 1359–1389) to commemorate his father and two of his uncles, who were praised in coeval sources as heroes of the war against the Marinids. In this article, I shall describe how the Ya'qubiyya was discovered in the 19th century, study the relevant sources in Arabic, discuss the extant buildings indicating their original parts, and touch upon the complex’s relations with other sites in the region. I shall conclude that, although the Ya'qubiyya commemorated members of the Zayyanid family who had fought successfully against the Marinids, its basic concept was adopted from the earlier shrine of the Marinid dynasty at Shalla (Rabat-Salé, Morocco).


Introduction
The French army marched into Algiers, the capital of the Ottoman regency in Algeria, on 5 July 1830. 1 Their military campaign including massacres of people and plundering of cities continued until 1847, when the self-declared "caliph" of the resistance against the foreign invasion, ʿAbd al-Qadir, eventually surrendered. No sooner was French control established over northern Algeria than scientists, historians, archaeologists, Arabists, and architects arrived, and began the systematic exploration of the country, including its architectural heritage. Though they were initially keen to find the majestic Roman monuments scattered around in North Africa, their investigations soon tended to focus equally on the medieval Islamic monuments. This was particularly the case with Tlemcen in western Algeria, once the capital of the Zayyanid (also known as "ʿAbd al-Wadid") dynasty , where the French invested considerable research (Oulebsir, 1994;Charpentier et al., 2011). 1 In this article, I give dates according to the Gregorian calendar, but when sources mention Islamic dates, those are marked with "AH" and converted to their Gregorian equivalent ("AD").
The study of the Islamic monuments of Tlemcen was initiated by the French Arabist and Hebraist Jean-Joseph-Léandre Bargès (1810Bargès ( -1896. He discovered two manuscripts on the history of the Zayyanid dynasty, from which he learnt about the existence of a certain Yaʿqubiyya madrasa (Bargès, 1859: pp. 334-337), and which claimed this to be the place where the sultan Abu Hammu Musa II had buried his father, Abu Yaʿqub, and two of his uncles, Abu Saʿid and Abu Thabit, in 1362. Nonetheless, Bargès was unable to identify the building during his visit to Tlemcen in 1846, mainly because the name "Yaʿqubiyya" that appeared in his sources had long been forgotten. It was another eminent Arabist and colonial officer, Charles Brosselard (1816Brosselard ( -1889, who securely identified the Yaʿqubiyya complex with the mosque and mausoleum then known as "Sidi Ibrahim al-Masmudi" in central Tlemcen . He discovered the existence of three royal burial sites of the Zayyanid dynasty: the garden of the "Old Palace", succeeded briefly by the Yaʿqubiyya, and then by another cemetery to the east of Tlemcen. Brosselard excavated at all three sites in search of tombstones, analyzed the material remains against what he learnt from the historical sources, and published the epitaphs in a seminal monograph (Brosselard, 1876).
Whereas Brosselard's meticulous study of the epitaphs remains invaluable today, this paper, unlike his publication, focuses on the history and architecture of the Yaʿqubiyya complex. I shall introduce the historical context and written sources for the site, discuss its original form and decoration, present its wider context of funerary architecture in the region, and conclude with the concept behind its establishment. Georges Marçais (1876Marçais ( -1972, the declared "king of Maghribi architecture" (Hillenbrand, 2012: p. 9), once claimed that the Yaʿqubiyya "follows a practice for which Egypt offers many examples", and he mentioned two 15 th -century funerary complexes in Cairo (Marçais and Marçais, 1903: p. 302). Pace Marçais, I shall argue that the Yaʿqubiyya was conceptually related to the two coeval funerary complexes in the region, the Rauda of the Alhambra (Granada) in Spain, and the shrine at Shalla (Rabat-Salé) in Morocco (for their locations, see Fig. 1).

Establishing the Yaʿqubiyya
During the 14 th century, the Zayyanid sultans struggled hard to maintain their independence from the Marinid state of Morocco. Most notable, even though unsuccessful, was the eight-year-long Marinid siege of Tlemcen between 1299 and 1307. After a second attempt, the Marinid sultan Abu al-Hasan (r. 1331-1351) eventually occupied Tlemcen in April 1337, and he decided to erect a splendid funerary complex for the saint Abu Madyan Shuʿayb (d. 1197) (Tuil Leonetti, 2015;Charpentier, 2018: pp. 90-98;131-133). The first Marinid rule over Tlemcen lasted for just over a decade until two brothers of the Zayyanid family, Abu Saʿid and Abu Thabit, gained independence in 1348, and ruled together until 1352. Then the Marinid sultan Abu ʿInan (r. 1351-1358) reconquered Tlemcen and erected a complex for the saint Sidi al-Halawi in 1353 (Charpentier, 2018: pp. 98-106). Notably, these Marinid monuments would commemorate not only the pious saints buried there, but also the names of the Marinid sultans who claimed to be the rightful leaders of the western Islamic world. In turn, the Zayyanids strived to demonstrate their strength and independence, a situation that would foster their investment in architectural patronage. Soon after Abu Hammu Musa II managed to re-establish the Zayyanid state, however briefly, in 1359, he founded the Yaʿqubiyya complex during the relatively stable period of the early 1360s. Then, in 1389, he was dethroned by his   son, Abu Tashfin, who came into power with the support of a Marinid army. Consequently, the Marinids would retain their control over Tlemcen until 1424(Abun-Nasr, 1987Marçais, 1960).
There are three contemporary sources regarding the foundation of the Yaʿqubiyya: two passages in a chronicle and one endowment certificate (hubus). The chronicle was written by the historian Yahya ibn Khaldun (d. 1379), who served at the court of Abu Hammu Musa II, which suggests that he had first-hand information on the described events. The first relevant passage is recorded from the year 763AH (1361-1362AD): This text tells us that the sultan Abu Hammu Musa II first buried his father, Abu Yaʿqub, near the Ilan Gate of Tlemcen, then transferred two of his uncles, Abu Saʿid and Abu Thabit, to the same burial ground, and finally established an ensemble of buildings above their graves.
Although it mentions only a madrasa (college) and a zawiya (convent), the same chronicle also refers elsewhere to the "noble tomb (darih)" of Abu Yaʿqub. 2 From the year 765AH (1363-1364 AD), Yahya ibn Khaldun once again highlights the munificent endowments made for the Yaʿqubiyya madrasa, to which the renowned scholar al-Sharif al-Tilimsani (d. 1369) was appointed as professor. He was esteemed to be one of the brightest jurisprudents of his age and said to have excelled in a number of other sciences including astronomy, philosophy, theology, mysticism, and mathematics. He lived mainly in Tlemcen until the city was occupied in 1352 by the Marinid sultan Abu ʿInan, who chose al-Sharif al-Tilimsani to be a member of his royal academic council and deported him to his capital, Fez. He later returned to Tlemcen on the invitation of Abu Hammu Musa II, who married one of his daughters, appointed him as his counsellor, and built the Yaʿqubiyya madrasa for him. 3 The inaugural lecture took place on 5 Safar 765AH/ 13 November 1363AD, attended by the sultan himself (Ibn Khaldun, 2007: pp. 283-284).
The endowment certificate of the Yaʿqubiyya complex is carved on a fragmented pair of marble slabs. It enumerates the properties -including mills, shops, bakeries, a bathhouse, an inn, and an olive grove -whose incomes were allotted to "the blessed zawiya that stands at the tomb", in order to provide maintenance and salaries "to the teachers of the science, the students, an imam (prayer leader) and a muʾadhdhin (who calls for prayer)" in perpetuity. 4 The text mentions three buildings, a tomb, a zawiya and a mosque, but since it also refers to teachers and students, it confirms that the Yaʿqubiyya originally included a madrasa as well. The end of the inscription is unfortunately illegible, but Brosselard could decipher two dates, 763AH/1361-62AD and [7]65AH/1363-64AD, which should refer, respectively, to establishing the Yaʿqubiyya and to creating the endowment.
Although the Yaʿqubiyya was built for Abu Yaʿqub, Abu Thabit and Abu Saʿid, their actual graves are only known from the written sources. When Brosselard excavated at the site, he was unable to find their tombstones, but only those belonging to later Zayyanid princesses and princes (Brosselard, 1876: pp. 21-43). The 17 th -century hagiographer Ibn Maryam adds that the saint and scholar Ibrahim al-Masmudi (d. 1401) was buried in the "mausoleum (rawda) of the Zayyanid family" (Ibn Maryam, 1908: p. 66). Consequently, the site changed its name into "Sidi Ibrahim al-Masmudi", and the memory of Abu Yaʿqub, Abu Thabit and Abu Saʿid eventually faded from public memory. This is hardly surprising since the Marinids took over Tlemcen soon after completing the Yaʿqubiyya, and they were, understandably, averse to cultivate the memory of the Zayyanids.

The Yaʿqubiyya then and today
As the written sources demonstrate, the Yaʿqubiyya originally comprised four main buildings: a mosque, a mausoleum, a madrasa, and a zawiya, but only the first two survive today. Bargès recorded the vestiges of a portal near the existing buildings (without identifying the site) in the mid-19 th century (Bargès, 1859: pp. 391-392), and later research concluded that it was part of the Yaʿqubiyya complex, most probably the gate of the madrasa (Marçais and Marçais, 1903: p. 303). In addition, an archival map of Tlemcen, made in 1847, records a rectangular building on the eastern side of the mosque, encompassing a central courtyard (Fig. 4, Charpentier et al., 2011: no. 3.13). Although these structures have not survived, the evidence available today indicates that the ensemble was originally larger, comprising several freestanding buildings.
The extent mosque follows a rectangular plan c. 21 m × c. 31 m, with three projecting portals and a square minaret attached to it near the northwest corner (Figs. 2, 5). It encompasses a roughly square courtyard with a fountain in the middle, and a prayer hall of five aisles and one transverse aisle in front of the mihrab (prayer niche). The aisles are separated by rectangular, T-shaped, or cross-shaped pillars supporting slightly pointed horseshoe arches. There are two openings on either side of the mihrab: the one on the right is occupied by the minbar (preacher's pulpit) that can be rolled out on wheels for the Friday sermon, and the one on the left leads to the room of the imam. However, according to 19 th -and 20 th -century site plans and descriptions of the building, this room did not exist at that time (Marçais and Marçais, 1903: pp. 304-305). A similar problem concerns the stucco-work decoration around the mihrab, composed of inscriptions, geometric and floral motifs (Fig. 6). Suspiciously, the stucco-work appears flawlessly intact but somewhat incomplete, featuring stylistic elements alien to the Zayyanid period, and inscriptions repeating the so-called "Nasrid motto", "there is no victor but God", that was mainly used in 14 th -century Granada. 5 Indeed, earlier scholars recorded that the arch of the mihrab was surrounded by tiles from the Ottoman period (Fig. 7), which are now replaced with the stuccowork (Marçais and Marçais, 1903: pp. 305-306;Lafer). Since an inscription inside the mihrab reveals that the "restoration" was completed in 2003, it appears that this part of the mosque was partially rebuilt and completely redecorated at that time.
The mausoleum is located in a separate building, c. 7.50 m × c. 14.50 m, on the west side of the mosque, and preceded by a square forecourt with four columns supporting horse-shoe arches (Figs. 3, 5). The domed chamber is entered from the forecourt through a large opening in the form of a horseshoe arch, which is repeated on all 5 On the Nasrid motto, see Puerta Vílchez (2011): pp. 19-23.  four walls of the mausoleum. Today the openings are fitted with wooden screens with polychrome windows and doors (Fig. 8). The earlier photos and site plans of the mausoleum, however, differ from the current layout in that they show three of the arches blind (Fig. 9, Marçais and Marçais, 1903: pp. 306-309). Whether those walls filling the arches were original parts of the building or added later is difficult to say, but the earlier studies did not note any structural discrepancy in the building. Given the extent of the recent "restorations", it seems likely that the demolished walls within the arches were original.
Even more problematic is the decoration inside the mausoleum, especially in its current form vis-à-vis an elevation drawn in 1873 (Fig. 10). The lower parts of the walls are covered with a tile mosaic (zillij) dado typical of Maghribi architecture. The upper parts of the walls feature stuccowork with geometric patterns, floral motives and inscriptions, some of which have been restored since the 19 th -century drawing. Be that as it may, the splendid    muqarnas (stalactite) dome covering the mausoleum today (Fig. 11) is striking, especially as the 19 th -century elevation, in agreement with all descriptions of this building, shows a plain octagonal dome (Marçais and Marçais, 1903: p. 309;Marçais, 1954: p. 301;Bourouiba, 1973: p. 130). What makes the present dome particularly odd is not only its pristine state, but also that many of its prismatic elements appear to be unfinished. In addition, some of its decorative and epigraphic motifs are identical to those around the mihrab of the mosque, not to mention that an inscription repeating the "Nasrid motto" runs around its octagonal base. Therefore, this muqarnas dome must be ascribed to the recent "restorations" of the Yaʿqubiyya.

Contextualizing the Yaʿqubiyya
Although the Zayyanids were active patrons of architecture, funerary complex, as a building type, was virtually absent among their monuments before the Yaʿqubiyya.
Nonetheless, several scholars have remarked that the mosque in the Yaʿqubiyya imitates the layout of the two mosques in the Marinid funerary complexes of Tlemcen, built for Abu Madyan (1339) and Sidi al-Halawi (1353). 6 Also, the mausoleum in the Yaʿqubiyya -especially if its side-walls were, as argued above, closed -follows the same layout as the mausoleum of Abu Madyan (Fig. 12). The three ensembles included the same basic functions, and it thus seems that the architects of Abu Hammu Musa II simply took the readily available complexes of Abu Madyan and Sidi al-Halawi as architectural models for the Yaʿqubiyya. Less clear is why the sultan decided to commemorate his father and uncles within such a royal funerary complex, a choice which, however, fits well into the larger context of architectural patronage in the region.
Most relevant, in this respect, is the Marinid shrine at Shalla (Rabat), which was probably the earliest funerary complex built for a ruling dynasty in the far west of the Islamic world. The Marinid sultans were buried there since 1286, though the main phase of construction -probably with the participation of an atelier from Tlemcentook place between 1331 and 1358 under the patronage of Abu al-Hasan and Abu ʿInan (Fig. 13). 7 Most importantly, Shalla set a precedent for commemorating deceased rulers within a funerary complex, and all subsequent dynasties in the region would establish similar ensembles. One early example of adopting this concept materialized in the Rauda of the Alhambra, the funerary complex of the Nasrid dynasty of Granada. As I argue elsewhere in detail, this complex was built between 1364 and 1370 upon the suggestion of the Nasrid vizier Ibn al-Khatib (d. 1375), following his personal experience at Shalla (Nagy, forthcoming).
The Yaʿqubiyya was erected during the war between the Marinids and the Zayyanids, and the sources also hint that the site should be interpreted in that context. The three brothers buried there, Abu Saʿid, Abu Thabit, and Abu Yaʿqub, are presented in the chronicles as dynastic heroes of the Zayyanid-Marinid war. In 1348, when Tlemcen had been under Marinid rule for over a decade, a civil war erupted between the sultan Abu al-Hasan and his son, Abu ʿInan, creating the opportunity for Abu Saʿid and Abu Thabit to 6 For the discussion of these mosques, see Duthoit (1873): p. 318; Marçais and Marçais, (1903): pp. 285-286;304;Marçais (1954): pp. 276-278;Bourouiba (1986): pp. 40-41;Charpentier (2014)   return from exile to Tlemcen and restore the Zayyanid state. They ruled together until the second Marinid conquest in 1352, and they both died on the battlefield. 8 The third brother, Abu Yaʿqub, was unconcerned with dynastic leadership, but was remembered as the "ascetic of the noble dynasty" (Ibn Khaldun, 2007: p. 45). He lived for a while in al-Andalus to participate in defending the territories of Islam, but then moved back to the Zayyanid state and retired to ascetic life, emerging only to take part in the wars for retaking Tlemcen in 1359 (Ibn Khaldun, 2007: pp. 48;53-76).
Yahya ibn Khaldun's chronicle recounts the funeral of Abu Yaʿqub, and quotes some of the poems recited at the ceremony. As the genre dictates, these poems are little but pompous praise of Abu Yaʿqub, and yet they also indicate how people were meant to remember the deceased. The first 8 Ibn Khaldun (1904): pp. 144-151;153-163 [in Arabic];pp. 192-201;203-214 [in French translation]. poem is said to have been written by the sultan Abu Hammu Musa II himself, and includes the following lines: "The lions surrender, and the kings fear him, how many are the people who obey and follow him, and how long did the troops march behind him! He frightens the courageous but is never frightened." (Ibn Khaldun, 2007: p. 231).
These lines, unlike other parts of the poem on the sultan's grief and Abu Yaʿqub's piety, highlight the alleged military achievements of the Zayyanids. The second poem recited at the funeral by a certain Muhammad ibn Yusuf al-Qaysi al-Andalusi reflects on the same topics, mentioning Abu Yaʿqub as "the one whose sword is served by the army of death / who destroyed an army at a crucial moment of destiny" (Ibn Khaldun, 2007: p. 235). The third poem, written by a certain Abu Abdallah al-Tilasi, focuses more on the figure of Abu Hammu Musa II: "Oh, my lord, Musa, who is of good fortune, who overcame tyranny with his plentiful armies. […] Oh you, the king whose time has arrived, and whose banners are victorious, The Lord of the throne salutes what you bestowed in terms of order and investiture in the two Maghribs." (Ibn Khaldun, 2007: pp. 240-241).
All the verses quoted above allude to Zayyanid victories, which could only have occurred during their fight for independence from the Marinids.
An additional piece of evidence may shed further light on the ideological concept behind establishing the Yaʿqubiyya. As mentioned above, in the 19 th century Bargès described a ruinous portal that belonged to the same complex, probably to the madrasa (Bargès, 1859: pp. 391-392;Marçais and Marçais, 1903: p. 303). Bargès also quoted the Quranic text that he could read on the vestiges of the portal: "We have given you a clear victory, / that God may forgive you your past sin and your sin which is to come, and that He may complete His blessing to you and guide you on a straight path, / and that God may help you with mighty help." (The Qurʾān, 2007: chapter 48, verses 1-3) This passage of the Quran is likely to be a further reference to the historical context in which the Yaʿqubiyya  was built, namely, the Zayyanids' victory against the Marinids. At any event, it emerges from the above discussion that the Yaʿqubiyya complex was meant to commemorate the praiseworthy leaders of the Zayyanid dynasty and their alleged great victories, right after they had gained independence from the Marinids in 1359. It thus seems that one of the means of representing independence was to establish a royal funerary complex comparable with that of the Marinids at Shalla.

Conclusions
As seen today, the Yaʿqubiyya complex retains little of its original appearance: some of the buildings have not survived, and the recent "restorations" are intended to lend unauthentic historical and artistic value to the site. Nonetheless, the extant structures provide ample evidence to argue that they followed the architecture of the two Marinid ensembles, those of Abu Madyan and Sidi al-Halawi, in Tlemcen, whereas the concept of a royal funerary complex seems to have derived from the Marinid shrine at Shalla. One may even propose that the idea of establishing the Yaʿqubiyya was promoted by the sultan's close associate and counsellor, al-Sharif al-Tilimsani, who had previously lived at the Marinid court and must have known about Shalla, and who then became the first professor of the Yaʿqubiyya madrasa. Be that as it may, the three Muslim dynasties in the far west of the Islamic world, the Marinids, Zayyanids and Nasrids, patronized the same basic form of royal funerary architecture in the 14 th century, which strongly suggests that these sites ought to be discussed as a single phenomenon. 9 The Yaʿqubiyya, similarly to the two other sites, was meant to commemorate members of the ruling family and their military achievements, and, in that manner, to enhance the independence and legitimacy of the dynasty. Conversely, it seems to have failed in its initial purpose: the Zayyanids soon lost their independence, the sultans starting with Abu Hammu Musa II were buried elsewhere, and the site eventually became known by the name of Sidi Ibrahim al-Masmudi.