The city became a provincial capital in 693, after the Arab invaders conquered Istakhr, the nearby Sassanian capital. As Istakhr fell into decline, Shiraz grew in importance under the Arabs and several local dynasties. The Buwayhid dynasty (945 — 1055) made it their capital, building mosques, palaces, a library and an extended city wall.
The city was spared destruction by the invading Mongols when its local ruler offered tributes and submission to Genghis Khan. Shiraz was again spared by Tamerlane when in 1382 the local monarch, Shah Shoja agreed to submit to the invader. In the 13th century, Shiraz became a leading center of the arts and letters, thanks to the encouragement of its ruler and the presence of many Persian scholars and artists. For this reason the city was named by classical geographers Dar al-Elm, the House of Knowledge. Among the important Iranian poets, mystics and philosophers born in Shiraz were the poets Sa'di and Hafiz the mystic Roozbehan and the philosopher Mulla Sadra.
Bazar of Shiraz as seen by Jane Dieulafoy in 1881
As early as the 11th century, several hundred thousand people inhabited Shiraz. In the 14th century Shiraz had sixty thousand inhabitants. During the 16th century it had a population of 200,000 people, which by the mid-18th century had decreased to only 50,000.
In 1504 Shiraz was captured by the forces of Ismail I, the founder of the Safavid dynasty. Throughout the Safavid empire (1501–1722) Shiraz remained a provincial capital and Emam Qoli Khan, the governor of Fars under Shah Abbas I, constructed many palaces and ornate buildings in the same style as those built in the same period in Isfahan, the capital of the Empire. After the fall of the Safavids, Shiraz suffered a period of decline, worsened by the raids of the Afghans and the rebellion of its governor against Nader Shah; the latter sent troops to suppress the revolt. The city was besieged for many months and eventually sacked. At the time of Nader Shah's murder in 1747 most of the historical buildings of the city were damaged or ruined, and its population fell to 50,000, a quarter of that of the 16th century.
Shiraz soon returned to prosperity under the enlightened rule of Karim Khan Zand who made it his capital in 1762. Employing more than 12,000 workers he constructed a royal district with a fortress, many administrative buildings, a mosque and one of the finest covered bazaars in Iran. He had a moat built around the city, constructed an irrigation and drainage system, and rebuilt the city walls. However, Karim Khan's heirs failed to secure his gains. When Agha Mohammad Khan, the founder of the Qajar dynasty, eventually came to power, he wreaked his revenge on Shiraz by destroying the city fortification and moving the national capital to Sari. Although lowered to the rank of provincial capital, Shiraz maintained a level of prosperity as a result of the continuing importance of the trade route to the Persian Gulf and its governorship was a royal prerogative throughout the Qajar dynasty. many of the famous gardens, buildings and residences built during the nineteenth century, contribute to the actual outlook of the city.
Shiraz is the birthplace of the founder of the short-lived Babi movement, the Báb (Sayyid `Ali-Muhammad Shirazi, 1819-1850). In this city, on the evening of 22 May 1844, he began discussions that led to his claiming to be an interpreter of the Qur'an, the first of several progressive claims between then and 1849. Since Shirazi is considered a 'forerunner' of the Baha'i religion, Shiraz is a holy city for Bahá’ís, where the Bab's House (demolished in 1979 by the Islamic regime) was a putative pilgrimage site.
Further information: 1910 Shiraz blood libel
In 1910 a pogrom of the Jewish quarter started after false rumours that the Jews had ritually killed a Muslim girl. In the course of the pogrom, 12 Jews were killed and about 50 were injured, and 6,000 Jews of Shiraz were robbed of all their possessions.
The city's role in trade greatly diminished with the opening of the trans-Iranian railway in the 1930s, as trade routes shifted to the ports in Khuzestan. Much of the architectural inheritance of Shiraz, and especially the royal district of the Zands, was either neglected or destroyed as a result of irresponsible town planning under the Pahlavi dynasty. Lacking any great industrial, religious or strategic importance, Shiraz became an administrative centre, although its population has grown considerably since the 1979 revolution.