Smara, also Semara is a city in the Moroccan-Administered Western Sahara. The largest city in its province, Smara was founded in the Saguia el-Hamra as an oasis for travellers in 1869. It is the only major city in Western Sahara that was not founded by the Spanish. In the center of the city the remains of a stone fortress can be found, the Zawiy Maalainin, which enclosed a mosque.
The Maalainin lived there from 1830 until 1912. It was made a capital and religious center in 1902 by shaykh Ma al-'Aynayn, in what was then Spanish Sahara. The location of the city was intended to ensure its becoming a caravan trade hub in the sparsely populated Sahara desert. The enlargement of Smara was carried out by local Sahrawis as well as craftsmen sent by the sultan Hassan I. In 1902, shaykh Ma al-'Aynayn moved to Smara and declared it his holy capital. Among other things, he created here an important Islamic library, and the town became a center of religious learning.