Medina is the second holiest city in Islam, known primarily for its importance in the early years of Muhammad's preaching, and as the site of the Mosque of the Prophet, which contains Muhammad's tomb. Currently, it is a major city of the modern nation-state of Saudi Arabia, located in the Hejaz region in the west of the country, approximately 180 km inland from the Red Sea and 200 km north of Mecca.

Pre-Islamic Medina (110 - 622 CE)

Before Muhammad's migration (hegira) to the city in 622, Medina was known as Yathrib, a loosely connected set of fertile oases supposedly inhabited since the time of Abraham. It was formally settled and cultivated in the sixth century BCE by three Jewish tribes, the Banu Quynuqa, the Banu Qurayza, and the Banu Nadir, who intermarried with the local Arabian population. Details as to the urban development of this settlement are limited, as the pre-Islamic history of the city is more closely linked to cultural conflict between rival clans than to its built environment. No pre-nineteenth century map of the city is known to exist.

Yathrib and Mecca shared a patron god of the Arabian pantheon named Manat, and so religious pilgrimages south to the Kaaba in Mecca (which housed the idols of the Arabian gods) were common. The well-worn caravan route between the two oases, both of which were stops on the ancient road between Yemen and Syria, was an active commercial corridor, but the city never achieved the mercantile clout of the prophet's birthplace. The city's economy was primarily agrarian, and the settlement pattern corresponded to the locations of wells and springs spread out over a relatively large area. Each tribe or clan in this heterogeneous area laid claim to a specific source of water, and interactions alternated between amicable and hostile. As such, Yathrib was not a cohesive urban entity. Conflict among its various communities was frequent, as were invasions from outsiders. Extant ruins of some of the area's many pre-Islamic fortresses attest to this multi-nodal network of defense, as opposed to the wall-based system of many of its contemporary cities. A wall would signify a specific urban integrity, whereas Yathrib was more of an agglomeration of oases that did not cohere, in the pre-Islamic era, into a single political community or distinct built environment.

Between the third and fourth century CE, the area attracted two Yemenite tribes, the Banu Awz and the Banu Khazraj. The longstanding conflict between these two Arab clans would only be resolved by the nascent Islamic diplomacy of Muhammad, who was invited to mediate between the city's warring factions after over a century of open warfare.

Medina in the time of Muhammad (622 - 632 CE)

Under constant threat of assassination from Mecca's hostile Quraysh tribesmen, Muhammad agreed to move to Yathrib, whose large population of Jewish monotheists he assumed would be receptive to his revival of Abraham's spiritual legacy. The constitution of Medina that he established formed the legal basis for his leadership and the relations between the region's various religious and ethnic communities. Yathrib became his base for conquering Arabia and converting its population to Islam, and it came to be known as Madinah al-Munawwara (the luminous city), Medinat an-Nabi (city of the Prophet) or Madinat Rasul Allah (city of the apostle of Allah). Medina, which means "city" in Arabic, is the shortened form of these eponyms.

While the urban layout of the city during this period is difficult to determine precisely, Medina provided an architectural typology that would be replicated the world over: Muhammad's house and his mosque provided the spatial organization of the religious, political, judicial and social functions of the Muslim house of prayer. Three entrances led to a roofed courtyard, where prayers were offered in the direction of the qibla. To the left of the qibla wall (which originally faced Jerusalem) lay the women's section. Eventually, design guidelines for the minbar and mihrab were articulated. When the Prophet died ten years later, with Mecca conquered and Islam spreading fast across the Middle East and beyond, his tomb became Medina's most famous landmark. While the ulema strictly enforced Islam's proscription against worshipping at a tomb, Muhammad's gravesite became an important site of pilgrimage for the early Muslims. To this day, pilgrims continue to visit Muhammad's tomb, often immediately after making Hajj in Mecca. The city grew rapidly as the four Rightly Guided Caliphs presided over a rapidly expanding Islamic empire.

Umayyad, Abbasid, Fatimid and Mamluk Periods (657 - 1517 CE)

The first Islamic Civil War of 657 resulted in the creation of the Umayyad dynasty. The Umayyads transferred the seat of Islamic power to Damascus in 661, and thus relegated Medina to the status of a provincial town, albeit one of extreme religious significance. The Umayyad Caliph al-Walid was the first of many Muslim rulers to expand the Mosque of the Prophet substantially, tearing down the original external walls and adding a teak roof and Greek and Coptic tiles. When power shifted from Damascus to Baghdad the Abbasids followed suit and enlarged the Mosque again. At the urban scale, defense was the primary determinant of Medina's urban development: Medina's wall dates from the ninth century, during the Abbasid period. While nothing remains of the first walls (attributed to 872, 966 and 1102), historians site them as closely surrounding the Mosque complex.

While the city would never regain its political importance, it remained a significant center of Islamic jurisprudence. As Islamic laws were codified in Medina over the years, it became, like Mecca, a city forbidden to non-Muslims. Unlawful entry was deemed punishable by death. Only in 1854 did a non-Muslim, Richard Burton, venture to the city in disguise and record his findings for popular readership in Britain. But the urban fabric that Burton discovered was largely built (or substantially renovated) between the fifteenth and nineteenth centuries, and Western scholarship on the medieval period remains more literary and religious than architectural. Medina's fate in the shifting political landscape of the medieval Muslim world, however, is well documented.

Medina and Mecca came under Fatimid control in the late tenth century. As the rivalry between Fatimid Cairo and Abbasid Baghdad grew, the holy cities of Arabia were somewhat insulated from politics and left to theological pursuits. In the ensuing Ayubbid and Mamluk (1260 - 1517), Mecca and Medina remained tied to the Cairo Sultanate, which continued the tradition of renovating the Mosque of the Prophet by adding a dome and an ablution fountain. The city's walls appear to date from Mamluk times. The Mosque continued to dominate the city at this time, and the commercial activity of pilgrims remained central to the province's economy.

Ottoman Period (1517 - 1917)

In 1517, the Ottoman Empire wrested control of the city from the Mamluks. Like many territories within the sultans' sphere of influence, the Hejaz was administered as an Ottoman suzerainty, with significant autonomy over all matters except foreign policy and defense. Local power, however, was concentrated in the hands of the Hashemite sharifs based in Mecca. Defensibility remained paramount, and the most significant urban wall was built between 1526 and 1537 by Suleyman the Magnificent. Neither Meccan nor Ottoman officials were entirely successful in defending the holy cities from the Wahhabi invasions of the early 19th century (the Wahhabis captured the city in 1804). Only when the Sultan in Istanbul called on the help of Muhammad Ali, the military leader of Cairo, were the Ottomans successful in driving the Wahhabis into the desert and regaining control of their Arab lands in 1812. This development led the Ottomans to exercise more sovereignty over Hejaz, which resulted in ambitious infrastructural advancements for the city, whose population 17,000 by 1819. Ottoman influence remains apparent, in the ruins of forts and in the impressive railway to Damascus, which opened in 1908 and formally connected Medina to the rest of the world. The modernization program that the Ottomans initiated at Mecca and Medina, however, was not extended to the rest of Ottoman Arabia.

By the early twentieth century, the number of faithful making Hajj to Mecca rose to the hundreds of thousands, and the majority of them made the additional trip north to the Medina. Among the international pilgrims who visited the Hejaz from distant lands ranging from Southern Africa to South East Asia were those who chose to remain permanently in the Holy Cities. These waves of immigration, coupled with the influence of Jeddah's importance as a Red Sea port, infused the cities of Hejaz with a cosmopolitan character that drew on the scholarly traditions of the region. The first stirrings of the Arab Revolt began within the Hejaz, when the Amir of Mecca, Husain ibn 'Ali al-Hashimi, began to recognize that the imperial power of the Ottoman Empire was on the wane. In 1916, Husain proclaimed the Hashemite kingdom of the Hejaz, the first independent state to emerge from Ottoman lands in Asia. The kingdom, however, would last less than a decade before falling to Ibn Saud and his Wahhabi troops after a 15-month siege in 1924. It was first absorbed into Najd in 1925 and, in 1932, into the modern nation-state of Saudi Arabia.

The Saudi period (1925 - present)

The initial years of Saudi rule were marred by the economic collapse that the conflict between the Sharifs and the Saudis had wrought. In the 1920s, the population of Medina had dwindled to 18,000. The discovery of oil in the 1930s, however, irrevocably changed the fortunes of Saudi Arabia and of the Holy Cities.

Ambition construction projects became the preferred mode of investment for Saudi oil money. And as was the case in the successive reigns of medieval Islam, all modernization programs began with an addition to the Prophet's Mosque. Medina's modern urban development began with the 1950 - 1955 Mosque renovation. The resulting rise in land price surrounding the Mosque, in addition to the municipal reorganization of the city and improved water infrastructure, led many citizens to build their homes far from the old city. Buildings close to the traditional center capitalized on the increased land value by building taller.

By the early 1960s, the population of Medina had climbed to 72,000, and the municipality responded by announcing a sweeping modernization campaign that would change the spatial character of the city considerably. Wide streets were paved, provided with lighting and lined with trees. Private homes were often expropriated and demolished to meet urban planning objectives. While the economy continues to be dominated by Hajj-related goods and services, agriculture - primarily dates and cereals - continues to support a section of the population, and irrigation infrastructure has evolved from wells to pumps. In 1961, Islamic University opened its doors, honoring the city's long scholarly tradition with a tertiary institute devoted to Islamic subjects, with students from across the world.

Today, Medina's population numbers approximately 900,000. Modern mixed-use mosque complexes, such as theMiqat MosqueComplex appear alongside the earliest examples of Islamic architecture. The mosque of the prophet remains the center of the now sprawling city. Now one hundred times its original size, it can accommodate half a million worshippers.