The main religion in Morocco is Sunni Islam, which is also the state religion of the country. Blasphemy against Islam is a punishable offense. Officially, 99% of the population are Muslim, and virtually all of those are Sunni. The second-largest religion in the country is Christianity, but most Christians in Morocco are foreigners. There is a community of the Baháʼí Faith. Only a fraction of the former number of Maghrebi Jews have remained in the country, many having moved to Israel.
Main article: Islam in Morocco
According to The World Factbook maintained by the American Central Intelligence Agency, and a 2009 report by the Pew Research Center, about 99% of Moroccans are Muslims. Almost all of those are Sunni, although Pew reported in 2012 that when asked which sect they belong to, 67% of those surveyed answered Sunni, while 30% volunteered only that they were Muslim.
Islam reached Morocco in 680 CE, taken to the country by the Arab Umayyad dynasty of Damascus. The first Islamic dynasty to rule Morocco were the Idrissids. Article 6 of the Moroccan constitution states that Islam is official religion of the state. The King of Morocco claims his legitimacy as a descendant of the Islamic prophet Muhammad.
The Maliki Sunnite branch of Islam is dominant, while a small minority belong to Zahirism or the Shiite branch. Relations between Sunni and Shiite have been strained in recent years, with a Moroccan crackdown on material and organisations originating from Shia-majority Iran and the group Hezbollah.
The Justice and Development Party is an Islamist party.
Morocco first experienced Christianity while under Roman rule, as the Empire converted to the faith in its later years. Christianity in Morocco appeared during the Roman times, when it was practiced by Christian Berbers in Roman Mauretania Tingitana. Many of the pre-Christian religions were then reduced in number as Christianity spread. However, after the arrival of Islam, Christianity ceased to have a significant population in the country until finally being reduced to near extinction under the almohad's forced conversion policy. Indigenous Christianity in North Africa effectively continued after the Muslim conquest until the early 15th century.
Due to the Spanish and French colonization beginning in the 19th century, Roman Catholicism grew in Morocco, albeit mainly being the European colonists. A small number of Moroccans with origins in these two countries remain in Morocco. The British, who mainly belonged to the Protestant Anglican Communion, were also given permission to build churches of their faith, such as the Church of Saint Andrew, Tangier.
During the French and Spanish protectorates, Morocco had significant populations of European Catholic settlers; on the eve of independence, an estimated 470,000 Catholics resided in Morocco. Since independence in 1956, the European Christian population has decreased substantially, and many Christians left to France or Spain. Prior to independence, the European Catholic settlers had historic legacy and powerful presence. Independence prompted a mass exodus of the European Christian settlers; after series of events over 1959-1960 more than 75% of Christian settlers left the country.
Sub-Saharan Africans, mainly Catholics from former French colonies, have migrated to Morocco in recent years. Conversions of Moroccan Muslims to Christianity, mainly by American Protestants in the remote and mountainous south of the country, have taken place despite the risk of legal consequences. The CIA World Factbook estimates that Christians are currently 1% (~380,000) of the Moroccan population.
Since 1960 a growing number of Moroccan Muslims are converting to Christianity. On 27 March 2010, the Moroccan magazine TelQuel stated that thousands of Moroccans had converted to Christianity. Pointing out the absence of official data, Service de presse Common Ground, cites unspecified sources that stated that about 5,000 Moroccans became Christians between 2005 and 2010. According to different estimates, there are about 8,000–40,000 Moroccan Christians of Berber or Arab descent, mostly converted from Islam. Other sources estimated the number of convert to the Anglican Moroccan Church of a bit more than 1,000. A popular Christian program by Brother Rachid has led many former Muslims in North Africa and the Middle East to convert to Christianity.
Morocco was a destination for the Jewish diaspora after the destruction of the Second Temple by the Roman Empire. A second wave of Sephardic Jews arrived in the country following the Alhambra Decree of 1492 which expelled all Jews from nearby Spain. The Jews, as well as the Christians, had legal autonomy relating to their own faith in cases when both parties were of the same religion.
After the creation of the Jewish state of Israel in 1948, the population of Moroccan Jews decreased significantly due to emigration. Moroccan Jews also migrated to other countries, such as the linguistically-similar France and Quebec, Canada. A total of 486,000 Israelis are of Moroccan origin, while the World Factbook estimates that in 2010 only around 6,000 Jews remained in Morocco. Most of them are elderly, with the largest population in Casablanca and the remainder thinly dispersed around the country.
The most recent estimates put the size of the Casablanca Jewish community at about 2,500, and the Rabat and Marrakesh Jewish communities at about 100 members each. The remainder of the Jewish population is dispersed throughout the country. This population is mostly elderly, with a decreasing number of young people.
Main article: Baháʼí Faith in Morocco
The Baháʼí Faith, which originated in the 19th century, is documented as starting its missions in Morocco in 1946, while the country was still under colonial rule. A Ten Year Crusade was initiated to spread the belief, establishing assemblies and schools in Morocco. In the early 1960s, shortly after independence, mass arrests were made of Baháʼís, and death sentences given to the most prominent believers, sparking international outrage. Most estimates count the Baháʼí population in modern Morocco as between 150 and 500. However Association of Religion Data Archives and Wolfram Alpha estimated 32,598 Baháʼís in 2005 and 2010.
Main article: Islam in Morocco
Survey results released in 2019 by Arab Barometer revealed that 13% of respondents who did the survey said they were not religious, compared to 82% who said they were, with 44% answering that they were somewhat religious, and 38% describing themselves as religious. Among those aged 18–29, only 24% said they were religious, compared to 68% of those aged 60 or more. Those without a university education were 20 points more likely to be religious than those with a degree. The proportion of religious respondents who were women was 44%, while 31% of men identified as such. The same survey saw nearly 100 percent of respondents identify as Muslims. Another 2021 Arab Barometer survey found that 67.8% of Moroccans identified as religious, 29.1% as somewhat religious, and 3.1% as non religious.
A 2015 poll by Gallup International found that 93% of those surveyed said they were a religious person, 4% responded that they were not a religious person, while about 1% described themselves as "convinced atheists".
Main article: Freedom of religion in Morocco
The government plays an active role in determining and policing religious practice for Muslims, and disrespecting Islam in public can carry punishments in the forms of fines and imprisonment.
Only the religions of Islam and Judaism are recognized by the Moroccan constitution as native to the country, with all other religions being considered "foreign". While foreigners can generally practice their religion in peace, citizens who practice "foreign religions" face obstacles from the government and social pressure. In particular, Shia Muslims and members of the Baháʼí Faith face discrimination from the government, as do some Christian groups.
In 2023, Morocco was ranked as one of the 30 countries in the world where it is most dangerous to be a Christian.
. In all an estimated 40,000 Moroccans have converted to Christianity
Converted Moroccans - most of them secret worshippers, of whom there are estimated to be anywhere between 5,000 and 40,000 -
There are no official statistics, but leaders say there are about 50,000 Moroccan Christians, most of them from the Protestant Evangelical tradition.
the Moroccan Association of Human Rights estimates there are 25,000 Christian citizens. One media source reported that while most Christians in the country are foreigners, there are an estimated 8,000 Christian citizens and that "several thousand" citizens have converted, mostly to Protestant churches..
Converts to Christianity form a tiny minority of Moroccans. While no official statistics exist, the US State Department estimates their numbers at between 2,000 and 6,000.