
Islam is the largestreligion in Morocco, with more than 99% of the population adhering to it. The largest subset ofMuslims inMorocco areMalikiSunni; other numerous groups include practitioners ofZahirism andnon-denominational Muslims.Islam is the nation'sstate religion.Blasphemy against Islam is a punishable offense.[1]
Islam was first brought to Morocco in 681 A.D. by anArab invasion under theUqba ibn Nafi, who was a general serving under theUmayyads ofDamascus. In 788, TheShiaIdrisids who espoused proZaydi views ruled large parts of Morocco. Their contemporaries included the hereticalBarghawata state and theKhariji state ofSijilmasa. After, severalBerbers formed more powerful Islamic dynasties that reigned over the country. Among them were theAlmoravids (1040–1147), who was the first to unite Morocco, as well as significant regions in West Africa, Spain and Algeria. The Almoravids were responsible for making theMaliki school of Islamic jurisprudence the most prominent in Morocco. It was later underAlmohad rule (1121–1269) that smaller Muslim sects were persecuted and orthodoxSunni Islam became prevalent across the country.[2][3][4]
In 2016, the government developed a strategy to further adherence to theMaliki Islamic school of thought. Religious education had textbook passages deemed promoting violence removed from the curriculum. As a result, religious textbooks had 24 lessons compared to the former 50.[5][6]

According to Pew, 99% ofMuslims in Morocco are Sunni predominantly of the Sunni Malikimadhab, or school of thought, whilst the remaining 1% adhere to other sects such asShia,Quranism,ibadism etc.[7] The administration ofKing Mohammed VI has combated the influence ofSalafism via a state program where 100,000 imams will go to the country's 50000 mosques and promote the moderate Islam of the Malikimadhab.[8] Morocco has a smallSalafi movement, some notable figures among it includeOmar al-Haddouchi andHassan Kettani. There are also adherents to theQuranist creed in Morocco, such as the author Rachid Aylal.[9][note 1] published a critical book on Bukhari's work in 2017,Sahih Al-Bukhari… The End of a Legend. It was banned in Morocco for disturbing spiritual security, purportedly due to pressure from Islamists.[10]
References:
{{cite web}}:Missing or empty|title= (help)Bibliography: