Muslims 98.7% (Sunnis), Christians 1.1%, Jews 0.2%.
Morocco is a constitutional monarchy. The king is both a secular and spiritual leader. According to Article 6 of the Moroccan Constitution, Sunni Islam is the state religion.
On the part of the state, there are no criminal sanctions against converts. However, the apostasy from Islam is strongly disapproved of in traditional Moroccan society in accordance with the Islamic tradition and usually leads to social exclusion when it is known. While Sharia (law) is not law in Morocco, discrimination can not be ruled out. Since Moroccans are far more involved in family and kinship than is customary in the West, this can have immediate consequences for livelihoods. (BAMF)
However, the Penal Code prohibits early attempts by non-Muslims to “shake the faith of the citizens of Sunni Islam” and punishes anyone who “uses enticements” to undermine the faith of a Muslim with six months to three years imprisonment.
The constitution and the law on the media prohibit any citizen, including parliamentarians who are usually immune from arrest, from criticizing Islam in public platforms such as print or online media or public speaking. Such statements are punishable by imprisonment of two years and a fine of 200,000 dirhams (19,700 US dollars).
The government continues to restrict the distribution of non-Islamic religious material and some Islamic materials that were incompatible with the Maliki Ashari school of Sunni Islam. Its policy continues to be to control the sale of all books, videotapes and DVDs which it considers extremist.
Relatives of unrecognized religious minorities say that the fear of social harassment, including proscription by convert families, social ridicule, discrimination in the workplace, and potential violence against them by “extremists” is the main reason for discreetly practising their faith. Members of the Baha’i Faith said they were open to their beliefs with family, friends, and neighbors, but dreaded that extremist elements in society would try to harm them, causing them to ask the local police for protection at their gatherings. Shiite Muslims said that in some areas, especially in large northern cities, they did not hide their faith from family, friends or neighbors, but many continued to avoid exposing their religious affiliation in areas where their numbers were smaller. (U.S.St.Dept.)
This situation should be even more pronounced for atheists.