Amidst the arid gravel plains and sweeping red dunes of the Saguia el-Hamra basin in Western Sahara, the rose-brown sandstone ramparts and rows of horseshoe-arched pillars at the historic Zaouia of Sheikh Ma al-Aynayn rise like a timeless oasis of learning. When the bright North African desert sun slants across the open stone arches of the old prayer hall, the long shadows of square masonry piers fall across sandy ground once trodden by thousands of scholars, caravan merchants, and Sufi disciples from Mauritania, Morocco, and as far away as Timbuktu.
Initiated in 1898 (1315 in the Hijri calendar) by the eminent theologian and spiritual master of the Qadiriyya and Fadiliyya orders, Sheikh Ma al-Aynayn, the Zaouia at Smara transformed a nomadic watering stop into the very first permanent stone-built city in Western Sahara. Serving simultaneously as a congregational mosque, a residential college, a library housing over 5,000 handwritten manuscripts, and a spiritual citadel, the complex linked the trans-Saharan caravan routes with the Islamic civilization of the Maghreb.

ISheikh Ma al-Aynayn and the Qadiriyya - Fadiliyya Sufi lineage
The spiritual stature of the Zaouia in Smara is inseparable from the life and scholarship of its founder, Sheikh Ma al-Aynayn (whose full Arabic name was Muhammad al-Mustafa wuld Sheikh Muhammad Fadil al-Qalqami). Historical sources record two closely aligned dates for his birth: the Encyclopaedia of Islam and many Western scholars place his birth around 10 February 1830 (1246 AH), whereas indigenous genealogical traditions and several Moroccan accounts give the year 1831 in the Hodh basin (Hawdh, in present-day southeastern Mauritania). His epithet Ma al-Aynayn literally means Water of the Two Eyes (signifying the precious light of the eyes), bestowed upon him by his mother Manna bint Ma'lum because he was her only surviving son after his older brother and paternal grandmother passed away on the very day he was born.
Sheikh Ma al-Aynayn was the son of the grand master Sheikh Muhammad Fadil wuld Mamin (1797 to 1869), founder of the Fadiliyya branch within the classical Qadiriyya Sufi order of Islam. Having memorized the entire Qur'an by the age of seven, he mastered both the exoteric religious sciences (Zahir, encompassing Maliki jurisprudence, Arabic grammar, and scriptural exegesis) and esoteric spiritual realization (Batin, the mystical path of Tasawwuf). At sixteen he traveled north to study in Fes and Marrakesh and completed the Hajj pilgrimage to Mecca in 1858 before returning to the Sahara to establish his teaching centers.
The philosophy of the Zaouia as a Ribat and the synthesis of Sufi orders
In the Islamic tradition of North and West Africa, a Zaouia (also spelled Zawiya, originally meaning a corner for spiritual retreat) functions simultaneously as a monastery where a master (Sheikh) imparts scripture and leads the remembrance of God (Dhikr), a tuition-free residential college, a food relief station, and an arbitration court settling disputes among nomadic tribes. The distinctive hallmark of Sheikh Ma al-Aynayn's teaching at Smara was his commitment to transcending sectarian rivalry among Sufi brotherhoods. He permitted disciples to receive the litanies (Wird) of the Qadiriyya, Tijaniyya, and Shadhiliyya orders alike, taking Islamic brotherhood and purification of the heart as the foundation for uniting desert tribes that had previously clashed over wells and pastures.
Sheikh Ma al-Aynayn also designated the complex at Smara as a Ribat, a frontier stronghold of spiritual vigilance that united outward readiness with the greater inward struggle of mastering the ego (Jihad al-Nafs). Erecting a permanent stone city in the open wilderness carried a clear symbolic meaning: establishing an enduring pillar of moral order and sacred scholarship amidst the shifting sands.
The erudition of Sheikh Ma al-Aynayn is attested by the vast body of writings he composed for the Smara library. His son and biographer Murabbih Rabbuh recorded in Qurrat al-Aynayn that his father authored 140 treatises, while the Spanish anthropologist Julio Caro Baroja cataloged up to 314 works big and small attributed to the Sheikh, spanning theology, Maliki law, and Sufi ethics (such as Mubsir al-Mutashawwif 'ala Muntakhab al-Tasawwuf) as well as classical poetry, traditional medicine, and desert astronomy.
IIBuilding the stone city in the Saguia el-Hamra basin
Prior to the late 19th century, the vast territory around the dry river basin of Saguia el-Hamra contained not a single town or fixed stone building. The indigenous Hassaniyya-speaking nomads lived in camel-hair tents (Khayma), moving with the seasonal rains. The site called Smara (named after Smar, the rushes growing around underground water seeps) was originally an oasis crossroads linking southern Morocco (the Souss, Oued Noun, and Tindouf) with the Adrar region of Mauritania. After founding his first lodge, Dar al-Hamra, between 1871 and 1872, Sheikh Ma al-Aynayn selected a raised terrace beside the Oued Selouane in Smara in 1898 (1315 AH) to lay the foundations of the Zaouia and Kasbah.
Constructing the Zaouia of Smara between 1898 and 1902 was a remarkable logistical feat in the desert. Backed by the Moroccan Sultan Moulay Abdelaziz (continuing the alliance forged under his father Sultan Moulay Hassan I), the royal steamship Turki, captained by the German officer Leonhard Karow, transported lime, cedar and pine timber, iron beams, carved wooden doors, and dozens of master masons and carpenters from the port of Mogador (Essaouira) and the Souss region down the Atlantic coast to the port of Tarfaya (Cape Juby). From Tarfaya, caravans of hundreds of camels organized by tribal disciples carried those heavy supplies nearly 200 kilometers inland across sand and stone to combine with locally quarried sandstone in building Smara.
- 1830 or 1831Birth of scholar Sheikh Ma al-AynaynMuhammad al-Mustafa al-Qalqami (Ma al-Aynayn) is born in the Hodh region (Mauritania) and raised in the Qadiriyya and Fadiliyya Sufi scholarly tradition of his father Muhammad Fadil.
- 1870 to 1872Settlement in Saguia el-Hamra and founding of Dar al-HamraFollowing his pilgrimage to Mecca, Sheikh Ma al-Aynayn settles in the Saguia el-Hamra basin and establishes his first lodge to mediate among nomadic tribes.
- 1898 (1315 AH)Construction of the Zaouia and Kasbah begins at SmaraThe Sheikh selects the caravan crossroads of Smara to build a stone city using local sandstone combined with timber, lime, and artisans brought inland from the port of Tarfaya.
- 1902 (1320 AH)Completion of the complex and the Grand LibrarySheikh Ma al-Aynayn takes up residence at the Smara Zaouia, assembling over 5,000 handwritten manuscripts and making the oasis the foremost center of Islamic learning in Western Sahara.
- 23 October 1910Passing of Sheikh Ma al-Aynayn in TiznitAfter relocating north to southern Morocco in 1909, the founder passes away in Tiznit. His mausoleum in Tiznit and the original Zaouia in Smara remain twin spiritual poles of the order.
- March 1913Architectural damage and dispersal of the libraryA French column under Colonel Mouret enters Smara, damaging the mosque domes and destroying many texts, though disciples evacuate a large portion of the manuscripts by camel.
- 1 November 1930Documentation by Michel VieuchangeFrench writer Michel Vieuchange crosses the desert to record notes and over 200 photographs of the ruins of the Smara Zaouia, published in Paris in 1932.
A distinction worth noting: while the Zaouia at Smara was Sheikh Ma al-Aynayn's spiritual capital and crowning architectural work, his actual tomb is located not in Smara but at the Zaouia of Tiznit (in the Souss-Massa region of southern Morocco), where he passed away in October 1910. In the memory of Saharan Sufi followers, the stone complex of Smara and the mausoleum of Tiznit form two inseparable halves of the heritage known as Al-Zawiya al-Ma'iya.
IIISandstone Kasbah architecture, Maghrebi horseshoe arches, and the ancient library
The historic Zaouia of Sheikh Ma al-Aynayn at Smara is laid out on an irregular quadrilateral plan covering a core area of roughly 3,780 square meters, enclosed within thick stone ramparts in the manner of a traditional Maghrebi and Moorish Kasbah (fortified citadel). The primary building material consists of rose-brown, ochre, and dark gray sandstone blocks quarried by hand from outcrops in the Saguia el-Hamra valley and bound with clay-lime mortar. Combining indigenous Saharan dry-stone masonry with arch construction, white lime plastering, and woodwork executed by craftsmen from Marrakesh and the Souss created a distinctive architectural synthesis.
The interior layout within the Zaouia walls is divided into three functional zones: the central residence and teaching halls of the Sheikh and his family, the Grand Mosque in the northeastern corner, and the manuscript repositories alongside quarters for hundreds of students.
Sandstone walls enclosing nearly 3,800 m², pierced by three arched gateways on the north, southeast, and family quarters, shielding the contemplative space from desert sandstorms.
A rectangular prayer hall divided into multiple bays by rows of square and octagonal stone piers supporting horseshoe arches characteristic of Andalusian and Maghrebi Islamic architecture.
The axis leading to the Mecca-facing Mihrab niche is crowned by stone vaulting. Historical records note that an initial tall dome collapsed under its own weight during building before being reworked.
Set at the heart of the complex around an open-air courtyard that catches cool night breezes, bordered by two-story chambers for tribal audiences, scriptural lectures, and family rooms.
Thick-walled, thermally insulated storage rooms adjacent to the lecture halls that once safeguarded over 5,000 books and handwritten manuscripts bound in geometrically tooled goatskin.
Outside the walls along the dry riverbed lie deep wells tapping underground aquifers and palm groves providing shade and food for the scholarly community.
When the French writer Michel Vieuchange reached Smara on 1 November 1930, he recorded the solemn beauty of the stone piers supporting horseshoe arches beneath the Saharan sky and the vaulted chambers of the Kasbah. Today the historic Zaouia of Sheikh Ma al-Aynayn is preserved as an archaeological and architectural monument beside Smara's modern mosque, allowing visitors to examine the original 19th-century sandstone masonry.
IVThe lie of the land and the facing
This section is the library's reading through the lens of traditional East Asian form-school feng shui placed alongside oasis settlement principles and the Islamic Qibla orientation, not something written in the Arabic texts of the order. In Islamic architecture, the supreme rule governing a mosque's alignment is the Qibla axis: the main wall containing the Mihrab prayer niche must face directly toward the Kaaba in Mecca.
Viewed within the broader terrain at coordinates 26.74238 degrees North and 11.68012 degrees West, the old Zaouia of Smara sits inside the basin of Saguia el-Hamra (Red Water Channel), a vast dry river valley running from the eastern plateaus toward the Atlantic Ocean in the west. In reading the lie of the land in desert regions lacking perennial surface rivers, dry wadis (Oued) carrying subterranean water beneath their sand and gravel beds serve as the water dragon vein (long mạch) that sustains life. The Zaouia stands on a raised sandstone terrace just north of the confluence where the Oued Selouane curves around the south and southwest. This elevated node avoids seasonal flash floods while keeping the underground water table pooled beneath the terrace as a hidden water-gathering bright hall (minh đường).
In terms of facing and compass direction, looking from the Smara oasis toward Mecca on the Arabian Peninsula, the Qibla axis of the Grand Mosque opens toward the east-northeast (roughly 76 to 78 degrees on the compass, corresponding to the Zhen trigram bordering Gen). The East belongs to the Wood element, associated with dawn, growth, and the awakening of intellect, a fitting alignment for a theological academy and library set in a desert dominated by Fire and Earth. Framing the north and northwest of the Kasbah are low stepped rocky ridges that act as a rear backing (hậu chẩm) shielding the compound from hot interior desert winds, while the four thick stone walls of the enclosed Ribat form a structure that shelters from wind and gathers qi, preserving moisture from the wells and palm gardens.
VFadiliyya Dhikr rites and pilgrimage traditions
Spiritual life connected with the heritage of the Zaouia of Ma al-Aynayn revolves around the Islamic Hijri lunar calendar and the devotional gatherings of the Qadiriyya - Fadiliyya Sufi brotherhood. Although the 1898 stone complex is now conserved as a historic monument beside the newer mosque, the traditions of prayer, scriptural chanting, and scholarly assembly among the descendants and disciples of the Ahl Shaykh Ma al-Aynayn continue across generations.
| Time (Hijri / Regular) | Rite and event | Spiritual and cultural content |
|---|---|---|
| Weekly on Friday afternoons (after Jumu'ah) | Fadiliyya Dhikr and Hadra chanting | Sufi disciples sit in a circle chanting the names of God (Allah) in unison and reciting devotional poetry in traditional Hassaniyya cadence. |
| 12th of Rabi' al-Awwal | Mawlid al-Nabi (Birth of the Prophet Muhammad) | The major annual festival across Saharan Zaouias, lasting several days with recitations of the Prophet's biography, scriptural lectures, and communal meals. |
| 9th Hijri month (Ramadan) | Complete Qur'an recitation and Laylat al-Qadr prayers | Honoring Sheikh Ma al-Aynayn's scholarly legacy, scholars and students gather to expound Maliki jurisprudence and share sunset Iftar meals. |
| Late October (commemorating 23 October 1910) | Commemoration of Sheikh Ma al-Aynayn's passing (Moussem) | Delegations of descendants and disciples from Smara, Laayoune, and Mauritania gather in fellowship with the Tiznit Zaouia to honor the founder and display family manuscripts. |
A cultural custom ever present at scholarly gatherings around the Smara Zaouia is the Saharan three-round mint tea ceremony (Atay) brewed over glowing charcoal: the first glass is bitter as life's trials, the second sweet as friendship and devotion, and the third gentle as inner peace. Over warm tea in the cool desert night, elders still recite the classical Arabic verses of Sheikh Ma al-Aynayn for younger generations.
VILocation And How To Get There
- Address
- Khu thành cổ Zaouia, trung tâm đô thị Smara (Es-Semara), lưu vực Saguia el-Hamra, Tây Sahara
- Getting there
- The Zaouia of Sheikh Ma al-Aynayn stands in the center of Smara (Es-Semara) in Western Sahara, approximately 240 kilometers southeast of the coastal city of Laayoune via the trans-desert highway and about 220 kilometers southeast of the port town of Tarfaya.
- Coordinates
- 26.74238, -11.68012
When visiting the historic Zaouia of Sheikh Ma al-Aynayn in Smara, please bear in mind that this is a revered religious sanctuary for the people of the Sahara. Visitors should wear modest attire covering shoulders and knees, and carry a traditional headscarf (Daraa or Melhfa) both as a sign of respect and for protection against desert sun and wind. Inside the old prayer hall and around the Mihrab foundation, please walk quietly and refrain from climbing on the sandstone walls or conserved horseshoe arches.
Nearby places in the library
VIIContribute To This Page
Contribute photos, information or video for Zaouia of Sheikh Ma al-Aynayn, Smara
Góp ảnh, thông tin hoặc video cho Thánh đường và Học viện cổ Zaouia Ma al-Aynayn tại SmaraEveryone is welcome to enrich this page: a photo you took, a detail the page misses, a short video. Every contribution is read and answered.
Thầy Ưng Khiêm mời cộng đồng cùng làm giàu trang này. Ảnh chụp tận nơi, một chi tiết lịch sử chưa được nhắc, một đoạn video ngắn: mọi đóng góp đều được đọc và trả lời.
No community contribution yet. You could be the first. Chưa có đóng góp nào từ cộng đồng. Bạn có thể là người đầu tiên.
?Quick Questions
Who built the Zaouia of Sheikh Ma al-Aynayn in Smara and in what year?
The Zaouia complex in Smara was founded in 1898 (1315 AH) and completed around 1902 by the eminent theologian and Qadiriyya - Fadiliyya Sufi master Sheikh Ma al-Aynayn (born 1830 or 1831, died 1910), transforming the Smara oasis into the first stone-built city in Western Sahara.
How was a large stone and timber complex built in the middle of the Sahara in the late 19th century?
Alongside quarrying sandstone and clay mortar locally in the Saguia el-Hamra valley, Sheikh Ma al-Aynayn received logistical support from the Moroccan Sultan Moulay Abdelaziz. Cedar timber, lime, ironwork, and master artisans were carried by the steamship Turki to the port of Tarfaya and transported nearly 200 kilometers inland by camel caravans to Smara.
What intellectual heritage was preserved in the ancient library of the Smara Zaouia?
The historic library at the Smara Zaouia was the foremost center of scholarship in Western Sahara, housing over 5,000 handwritten Arabic manuscripts on Maliki jurisprudence, theology, Sufi mysticism, astronomy, mathematics, and medicine, including more than 300 works composed by Sheikh Ma al-Aynayn himself.
What are the main architectural features of the Zaouia of Sheikh Ma al-Aynayn in Smara?
Spanning roughly 3,780 square meters, the complex combines a fortified Kasbah and spiritual Ribat in Maghrebi and Moorish style. It features sandstone ramparts with three main gates, a central residence with an open courtyard, and a northeastern Grand Mosque noted for its stone piers supporting horseshoe arches and a central dome.
Is the tomb of Sheikh Ma al-Aynayn located in Smara or in Tiznit?
While the Zaouia in Smara was the spiritual capital, academy, and stone city founded by Sheikh Ma al-Aynayn in 1898, he relocated north to southern Morocco in 1909 and passed away in Tiznit on 23 October 1910. His actual mausoleum is at the Zaouia of Tiznit, whereas Smara preserves the original academy and mosque ruins.