Before the Islamic conquest, the Persians had been mainly Zoroastrian; however, there were also large and thriving Christian and Jewish communities, especially in the territories of at that time northwestern, western, and southern Iran, mainly Caucasian Albania, Asōristān, Persian Armenia, and Caucasian Iberia. There was a slow but steady movement of the population toward Islam. When Islam was introduced to Iranians, the nobility and city-dwellers were the first to convert, Islam spread more slowly among the peasantry and the dehqans, or landed gentry. By the late 11th century, the majority of Persians had become Muslim, at least nominally.

Iran's population is about 82,000,000 people,[2] and Islam is the religion of 99.4% of Iranians. Nearly 90% of Iranians are Shi'a and about 10% are Sunni. Most Sunnis in Iran are Kurds, Larestani people (from Larestan), Turkomen, and Baluchs, living in the northwest, northeast, south, and southeast.[1] Almost all of Iranian Shi'as are Twelvers.

Though Iran is known today as a stronghold of the Shi'a Muslim faith, it did not become so until much later, around the 15th century. The Safavid dynasty made Shi'a Islam the official state religion in the early sixteenth century and aggressively proselytized on its behalf. It is also believed that by the mid-seventeenth century most people in Iran and the territory of the contemporary neighboring Republic of Azerbaijan had become Shi'as,[3] an affiliation that has continued. Over the following centuries, with the state-fostered rise of a Persian-based Shi'ite clergy, a synthesis was formed between Persian culture and Shi'ite Islam that marked each indelibly with the tincture of the other.

"These events have been variously seen in Iran: by some as a blessing, the advent of the true faith, the end of the age of ignorance and heathenism; by others as a humiliating national defeat, the conquest and subjugation of the country by foreign invaders. Both perceptions are of course valid, depending on one's angle of vision."

Under Umar and his immediate successors, the Arab conquerors attempted to maintain their political and cultural cohesion despite the attractions of the civilizations they had conquered. The Arabs were to settle in the garrison towns rather than on scattered estates. The new non-Muslim subjects, or dhimmi, were to pay a special tax, the jizya or poll tax, which was calculated per individual at varying rates for able bodied men of military age.[6]

Iranians were among the very earliest converts to Islam, and their conversion in significant numbers began as soon as the Arab armies reached and overran the Persian plateau. Despite some resistance from elements of the Zoroastrian clergy and other ancient religions, the anti-Islamic policies of later conquerors like the Il-khanids, the impact of the Christian and secular West in modern times, and the attraction of new religious movements like Babism and the Bahai faith (qq.v.), the vast majority of Iranians became and have remained Muslims. Today perhaps 98 percent of ethnic Iranians, including the population of Persia, are at least nominal Muslims. For such a fundamental, pervasive, and enduring cultural transformation, the phenomenon of Iranian conversions to Islam has received remarkably little scholarly attention (for an early and still worthwhile survey of the subject, see Arnold, pp. 209–20; for significant recent advances, see Bulliet, 1979a; idem, 1979b).

Recent research has established a general chronological framework for the process of conversion of Iranians to Islam. From a study of the probable dates of individual conversions based on genealogies in biographical dictionaries, Richard Bulliet has suggested that there was gradual and limited conversion of Persians down to the end of the Umayyad period (132/750), followed by a rapid increase in the number of conversions after the ʿAbbasid revolution, so that by the time when regional dynasties had been established in the east (ca. 338/950) 80 percent or more of Iranians had become Muslims. The data on which Bulliet’s study was based limited the validity of this paradigm to generalizations about full, formal conversions in an urban environment. The situation in rural areas and individual regions may have been quite different, but the overall pattern is consistent with what can be deduced from traditional historical sources. Although in some areas, for example, Shiraz at the time of Moqaddasi’s visit in about 375/985 (p. 429), there may still have been strong non-Muslim elements, it is reasonable to suppose that the Persian milieu as a whole became predominantly Islamic within the period of time suggested by Bulliet’s research.[7]

Following the Abbasid revolution of 749-51, in which Iranian converts played a major role, the Caliphate's center of gravity moved to Mesopotamia and underwent significant Iranian influences.[8] Accordingly, the Muslim population of Iran rose from approx. 40% in the mid 9th century to close to 100% by the end of 11th century.[9] Islam was readily accepted by Zoroastrians who were employed in industrial and artisan positions because, according to Zoroastrian dogma, such occupations that involved defiling fire made them impure.[10] Moreover, Muslim missionaries did not encounter difficulty in explaining Islamic tenets to Zoroastrians, as there were many similarities between the faiths. According to Thomas Walker Arnold, for the Persian, he would meet Ahura Mazda and Ahriman under the names of Allah and Iblis.[10]Muslim leaders in their effort to win converts encouraged attendance at Muslim prayer, and allowed the Quran to be recited in Persian instead of Arabic so that it would be intelligible to all.[10] The first complete translation of the Qur'an into Persian occurred during the reign of Samanids in the 9th century. Seyyed Hossein Nasr suggests that the rapid increase in conversion was aided by the Persian nationality of the rulers.[9][11]

"Iran was indeed Islamized, but it was not Arabized. Persians remained Persians. And after an interval of silence, Iran reemerged as a separate, different and distinctive element within Islam, eventually adding a new element even to Islam itself. Culturally, politically, and most remarkable of all even religiously, the Iranian contribution to this new Islamic civilization is of immense importance. The work of Iranians can be seen in every field of cultural endeavor, including Arabic poetry, to which poets of Iranian origin composing their poems in Arabic made a very significant contribution. In a sense, Iranian Islam is a second advent of Islam itself, a new Islam sometimes referred to as Islam-i Ajam. It was this Persian Islam, rather than the original Arab Islam, that was brought to new areas and new peoples: to the Turks, first in Central Asia and then in the Middle East in the country which came to be called Turkey, and India. The Ottoman Turks brought a form of Iranian civilization to the walls of Vienna..."[12]

In the 9th and 10th centuries, non-Arab subjects of the Ummah, especially Persians created a movement called Shu'ubiyyah in response to the privileged status of Arabs. This movement led to resurgence of Persian national identity.[16] Although Persians adopted Islam, over the centuries they worked to protect and revive their distinctive language and culture, a process known as Persianization. Arabs and Turks also participated in this attempt.[17][18][19]

As the power of the Abbasid caliphs diminished, a series of dynasties rose in various parts of Iran, some with considerable influence and power. Among the most important of these overlapping dynasties were the Tahirids in Khorasan (820-72); the Saffarids in Sistan (867-903); and the Samanids (875-1005), originally at Bokhara. The Samanids eventually ruled an area from central Iran to Pakistan.[20] By the early 10th century, the Abbasids almost lost control to the growing Persian faction known as the Buwayhid dynasty (934-1055). Since much of the Abbasid administration had been Persian anyway, the Buwayhid, who were ZaidiShia, were quietly able to assume real power in Baghdad.

The Samanid dynasty was the first fully native dynasty to rule Iran since the Muslim conquest, and led the revival of Persian culture. The first important Persian poet after the arrival of Islam, Rudaki, was born during this era and was praised by Samanid kings. The Samanids also revived many ancient Persian festivals. Their successor, the Ghaznawids, who were of non-Iranian Turkic origin, also became instrumental in the revival of Persian.[21]

In 962 a Turkish governor of the Samanids, Alptigin, conquered Ghazna (in present-day Afghanistan) and established a dynasty, the Ghaznavids, that lasted to 1186.[20] Later, the Seljuks, who like the Ghaznavids were Turks, slowly conquered Iran over the course of the 11th century. Their leader, Tughril Beg, turned his warriors against the Ghaznavids in Khorasan. He moved south and then west, conquering but not wasting the cities in his path. In 1055 the caliph in Baghdad gave Tughril Beg robes, gifts, and the title King of the East. Under Tughril Beg's successor, Malik Shah (1072–1092), Iran enjoyed a cultural and scientific renaissance, largely attributed to his brilliant Iranian vizier, Nizam al Mulk. These leaders established the Isfahan Observatory where Omar Khayyám did much of his experimentation for a new calendar, and they built religious schools in all the major towns. They brought Abu Hamid Ghazali, one of the greatest Islamic theologians, and other eminent scholars to the Seljuk capital at Baghdad and encouraged and supported their work.[20]

A serious internal threat to the Seljuks during their reign came from the Hashshashin- Ismailis of the Nizari sect, with headquarters at Alamut between Rasht and Tehran. They controlled the immediate area for more than 150 years and sporadically sent out adherents to strengthen their rule by murdering important officials. Several of the various theories on the etymology of the word assassin derive from this group.[20]

Although Shi'as have lived in Iran since the earliest days of Islam, the writers of the Four Books of Shi'a ahadith were Iranians of the pre-Safavid era and there was one Shi'a dynasty in part of Iran during the tenth and eleventh centuries, according to Mortaza Motahhari the majority of Iranian scholars and masses remained Sunni till the time of the Safavids.[22]

The domination of the Sunni creed during the first nine Islamic centuries characterizes the religious history of Iran during this period. There were however some exceptions to this general domination which emerged in the form of the Zaydīs of Tabaristan, the Buwayhid, the rule of Sultan Muhammad Khudabandah (r. Shawwal 703-Shawwal 716/1304-1316) and the Sarbedaran. Nevertheless, apart from this domination there existed, firstly, throughout these nine centuries, Shia inclinations among many Sunnis of this land and, secondly, original Imami Shiism as well as Zaydī Shiism had prevalence in some parts of Iran. During this period, Shia in Iran were nourished from Kufah, Baghdad and later from Najaf and Hillah.[23]

However, during the first nine centuries there are four high points in the history of this linkage:

First, the migration of a number of persons belonging to the tribe of the Ash'ari from Iraq to the city of Qum towards the end of the first/seventh century, which is the period of establishment of Imamī Shī‘ism in Iran.

Second, the influence of the Shī‘ī tradition of Baghdad and Najaf on Iran during the fifth/eleventh and sixth/twelfth centuries.

Third, the influence of the school of Hillah on Iran during the eighth/fourteenth century.

Fourth, the influence of the Shī‘ism of Jabal Amel and Bahrain on Iran during the period of establishment of the Safavid rule.[23]

Due to their history being almost fully intertwined, Iran as well as Azerbaijan are both discussed here. Iran and Azerbaijan were predominantly Sunni until the 16th century. Changes in the religious make-up of nowadays both nations changed drastically from that time and on. In 1500 the Safavid Shah Ismail I undertook the conquering of Iran and Azerbaijan and commenced a policy of forced conversion of Sunni Muslims to Shia Islam. Many Sunnis were murdered. When Shah Ismail I conquered Iraq, Dagestan, Eastern Anatolia, and Armenia he similarly forcefully converted or murdered Sunni Muslims. The oppression and forced conversion of Sunnis would continue, mostly unabated, for the greater part of next two centuries until Iran as well as what is now Azerbaijan became predominantly Shi’ite countries.[3]

As in the case of the early caliphate, Safavid rule had been based originally on both political and religious legitimacy, with the shah being both king and divine representative. With the later erosion of Safavid central political authority in the mid-17th century, the power of the Shia scholars in civil affairs such as judges, administrators, and court functionaries, began to grow, in a way unprecedented in Shi'ite history. Likewise, the ulama began to take a more active role in agitating against Sufism and other forms of popular religion, which remained strong in Iran, and in enforcing a more scholarly type of Shi'a Islam among the masses. The development of the ta'ziah—a passion play commemorating the martyrdom of Imam Husayn and his family — and Ziarat of the shrines and tombs of local Shi'ite leaders began during this period, largely at the prompting of the Shi'ite clergy.[24] According to Mortaza Motahhari, the majority of Iranians turned to Shi'a Islam from the Safavid period onwards. Of course, it cannot be denied that Iran's environment was more favorable to the flourishing of the Shi'a Islam as compared to all other parts of the Muslim world. Shi'a Islam did not penetrate any land to the extent that it gradually could in Iran. With the passage of time, Iranians' readiness to practise Shi'a Islam grew day by day.
It was the Safavids who made Iran the spiritual bastion of Shi’ism against the onslaughts of shi'as' by orthodox Sunni Islam, and the repository of Persian cultural traditions and self-awareness of Iranianhood,[25] acting as a bridge to modern Iran. According to Professor Roger Savory:[26]

“

In Number of ways the Safavids affected the development of the modern Iranian state: first, they ensured the continuance of various ancient and traditional Persian institutions, and transmitted these in a strengthened, or more 'national', form; second, by imposing Ithna 'Ashari Shi'a Islam on Iran as the official religion of the Safavid state, they enhanced the power of mujtahids. The Safavids thus set in train a struggle for power between the urban and the crown that is to say, between the proponents of secular government and the proponents of a theocratic government; third, they laid the foundation of alliance between the religious classes ('Ulama') and the bazaar which played an important role both in the Persian Constitutional Revolution of 1905–1906, and again in the Islamic Revolution of 1979; fourth the policies introduced by Shah Abbas I conduced to a more centralized administrative system.

During the 20th century Iran underwent significant changes such as the 1906 Constitutional Revolution and the secularism of the Pahlavi dynasty.

According to scholar Roy Mottahedeh, one significant change to Islam in Iran during the first half of the 20th century was that the class of ulema lost its informality that allowed it to include everyone from the highly trained jurist to the "shopkeeper who spent one afternoon a week memorizing and transmitting a few traditions." Laws by Reza Shah that requiring military service and dress in European-style clothes for Iranians, gave talebeh and mullahs exemptions, but only if they passed specific examinations proving their learnedness, thus excluding less educated clerics.

In addition Islamic Madrasah schools became more like 'professional' schools, leaving broader education to secular government schools and sticking to Islamic learning. "Ptolemaic astronomy, Aveicennian medicines, and the algebra of Omar Kahayyam" was dispensed with.[27]

Shia clergy tend to view missionary work among Sunnis to convert them to Shi'a Islam as a worthwhile religious endeavor.[41] In those towns with mixed populations in the Persian Gulf region, and Sistan and Baluchistan, tensions between Shi'as and Sunnis existed both before and after the Revolution. Religious tensions have been highest during major Shi'a observances, especially Moharram.[41]

Iran's government is unique in following the principle of velayat-e faqih or guardianship of the jurist, according to which
government must be run in accordance with traditional Islamic sharia, and for this to happen a leading Islamic jurist (faqih) must provide political "guardianship" (wilayat or velayat) over the people.
Following the Iranian Revolution, the 1979 Constitution of Islamic Republic of Iran made the "guardian" the Supreme Leader of Iran[42] The author of Velayat-e faqih doctrine, Ayatollah Khomeini, as the first Supreme Leader of the Islamic Republic.

The Constitution of the Islamic Republic of Iran mandates that the official religion of Iran is Shia Islam and the TwelverJa'fari school, though it also mandates that other Islamic schools are to be accorded full respect, and their followers are free to act in accordance with their own jurisprudence in performing their religious rites and recognizes Zoroastrian, Jewish, and ChristianIranians as religious minorities. As part of this mandate of allowing other practices, however, the Islamic Republic does not allow Sunni mosques in areas where Sunnis are not the demographic majority.[43]

Citizens of the Islamic Republic of Iran are officially divided into four categories: Muslims, Zoroastrians, Jews and Christians. This official division ignores other religious minorities in Iran, notably those of the Bahá'í faith. Bahá’ís are a "non-recognized" religious minority without any legal existence. They are classified as "unprotected infidels" by the authorities, and are subject to systematic discrimination on the basis of their beliefs. Similarly, atheism is officially disallowed; one must declare oneself as a member of one of the four recognized faiths in order to avail oneself of many of the rights of citizenship.[44]

Historically, the most important religious institution in Iran has been the mosque. In towns and cities, congregational prayers, as well as prayers and rites associated with religious observances and important phases in Muslim life, took place in mosques. Primarily an urban phenomenon, mosques did not exist in most Iranian villages. In the years preceding the Revolution, Iranian Shias generally attached diminishing significance to institutional religion, and by the 1970s there was little emphasis on mosque attendance, even for the Friday congregational prayers. During the Revolution, however, mosques in large cities played a prominent social role in organizing people
for large demonstrations. Since that time, the mosques have continued to play important political and social roles, in addition to their traditional religious functions.[45] At the same time, weekly mosque attendance rate in Iran has been very low compared to other Muslim countries.[46] In particular, politicization of Friday prayers under the Islamic Republic has had the paradoxical consequence of discouraging religious people from attending Friday prayers. People who attend prayers tend to have more positive evaluation of the political system than people who do not attend.[46]:228–9

Another religious institution of major significance has been the hoseiniyeh, or Islamic center. Wealthy patrons financed construction of hoseiniyehs in urban areas to serve as sites for recitals and performances commemorating the martyrdom of Hussein, especially during the month of Moharram. In the 1970s, hoseiniyehs such as the Hoseiniyeh Irshad in Tehran became politicized as prominent clerical and lay preachers helped to lay the groundwork for the Revolution by referring to the symbolic deaths as martyrs of Hussein and the other imams in veiled but obvious criticism of Mohammad Reza Shah’s regime. Institutions providing religious education include madrassas, or seminaries, and maktabs, or primary schools run by the clergy. The madrassas historically were important settings for advanced training in Shia theology and jurisprudence. Each madrassa generally was associated with a noted Shia scholar who had attained the rank of ayatollah. Some older madrassas
functioned like religious universities at which several scholars taught diverse religious and secular subjects. Students, or talabehs, lived on the grounds of the madrassas and received stipends for the duration of their studies, usually a minimum of seven years, during which they prepared for the examinations that qualify a seminary student to be a low-level preacher, or mullah. At the time of the Revolution, there
were slightly more than 11,000 talabehs in Iran, approximately 60 percent of them at the madrassas in Qom. From 1979 to 1982, the number of talabehs in Qom more than tripled from 6,500. There were just under 25,000 talabehs at all levels of study in Qom seminaries in the early 2000s, as well as about 12,000 talabehs at seminaries in other Iranian cities.[45]

Maktabs started to decline in number and importance in the first decades of the twentieth century, once the government began developing a national public school system. Nevertheless, maktabs continued to exist as private religious schools until the Revolution. Because the overall emphasis of public schools has remained secular subjects, since 1979 maktabs have continued to serve children whose parents want them to have a more religious education.[45]

Another major religious institution in Iran is the shrine. Pilgrimage to the shrines of imams is a specific Shia custom, undertaken because Shia pilgrims believe that the imams and their relatives have the power to intercede with God on behalf of petitioners. Of the more than 1,100 shrines in Iran, the most important are those for the Eighth Imam, Ali al-Ridha, in Mashhad and for his sister Fatimah bint Musa in Qom, and for Seyyed Rouhollah Khomeini in Tehran. Each of these is a huge complex that includes the mausoleum of the venerated one, tombs of various notables, mosques, madrassas, and libraries. Imam Reza's shrine is considered the holiest. In addition to the usual shrine accoutrements, it comprises hospitals, dispensaries, a museum, and several mosques located in a series of courtyards surrounding the imam’s tomb. The shrine's endowments and gifts are the largest of all religious institutions in the country. Although there are no special times for visiting this or other shrines, it is customary for pilgrimage traffic to be heaviest during Shia holy periods. Visitors represent all socioeconomic levels. Whereas piety is a motivation for many, others come to seek the spiritual grace or general good fortune that a visit to the shrine is believed to ensure. Since the nineteenth century, it has been customary among the bazaar class and members of the lower classes to recognize those who have made a pilgrimage to Mashhad by prefixing their names with the title mashti. Shrine authorities have estimated that at least 4 million pilgrims visit the shrine annually in the early 2000s. There are also important secondary shrines for other relatives of the Eighth Imam in Tehran and Shiraz. In virtually all towns and in many villages, there are numerous lesser shrines, known as imamzadehs, that commemorate descendants of the imams who are reputed to have led saintly lives. In Iraq the shrines at Karbala and An Najaf also are revered by Iranian Shias. Pilgrimages to these shrines and the hundreds of local mamzadehs are undertaken to petition the saints to grant special favors or to help one through a period of troubles. The constant movement of pilgrims from all over Iran has helped bind together a linguistically heterogeneous population. Pilgrims serve as major sources of information about conditions in different parts of the country and thus help to mitigate the
parochialism of the regions.[45]

The vaqf is a traditional source of financial support for all religious institutions. It is a religious endowment by which land and other income-producing property is given in perpetuity for the maintenance of a shrine, mosque, madrassa, or charitable institution such as a hospital, library, or orphanage. A mutavalli administers a vaqf in accordance with the stipulations in the donor's bequest. In many vaqfs, the position of mutavalli is hereditary. Under the Pahlavis, the government attempted to exercise control over administration of the vaqfs, especially those of the larger shrines. This practice caused conflict with the clergy, who perceived the government's efforts as inimical
to their influence and authority in traditional religious matters. The government’s interference with the administration of vaqfs during the Pahlavi era led to a sharp decline in the number of vaqf bequests. Instead, wealthy and pious Shias chose to give financial contributions directly to the leading ayatollahs in the form of zakat, or obligatory alms. The clergy, in turn, used the funds to administer their madrassas and to institute various educational and charitable programs, which indirectly provided them with more influence in society. The access of the clergy to a steady and independent source of funding was an important factor in their ability to resist state controls, and ultimately helped them direct the opposition to the shah.[45]

Statistics of religious buildings according to آمارنامه اماکن مذهبی which has been gathered in 2003.

^R.M. Savory, "Rise of a Shi'i State in Iran and New Orientation in Islamic Thought and Culture" in UNESCO: History of Humanity, Volume 5: From the Sixteenth to the Eighteenth Century, London ; New York : Routledge ; Paris. pg 263.[1]

^Mottahedeh, Roy, The Mantle of the Prophet : Religion and Politics in Iran, One World, Oxford, 1985, 2000, p.232-4, 7