In a fiery sermon last month, an influential state-appointed cleric declared it a sin for women to work. He condemned the "intermingling of sexes in civil services" and chastised the "scantily dressed women" on Moroccan beaches.
The sermon at Morocco's largest and most prestigious mosque has sparked a war of words between modernists and Islamists as Morocco tries to modernize without isolating its conservative religious base or emboldening a growing number of radical Islamists.
"The problem is that there is a discrepancy between the official religious speech and the popular speech of the Islamists," says Islam specialist Mohamed Darif, noting that Moroccan authorities have vowed to rein in radical clerics and revise religious rhetoric to spread a more moderate Islam.
The growing popularity of ultraconservative Islam has the government worried that moderate Islam is slowly losing ground to radical Wahhabism, which many fear could turn Morocco into a breeding ground for terrorists.The spreadof radical Islam also makes it more difficult to institute modern reforms, such as implementing the country's relatively new women's rights law.
Last week in Spain, an antiterrorism judge testified that there are more than 100 Al Qaeda links in Morocco that pose a profound threat to Europe. Many of the suspects jailed in connection with the March 11 train bombings in Madrid are Moroccan.
In recent years, the Internet and satellite TV have made it possible to package and sell to a broader audience the austere theories of foreign Wahhabi clerics like Hassan Yacoubi, Youssef al-Qardawi, and Moroccan and Saudi-educated Omar al-Qazabri. In response, Moroccan authorities are trying new tacks to clamp down on extremism.
The Ulema Councils, which have always been a tool to legitimize the religious status of the king, have been reorganized to spread the government-approved version of Islam among Moroccans and to put the country's 32,000 mosques - which are both state-controlled and privately funded - under tight scrutiny.
In a speech last April before the country's most renowned ulemas, King Mohamed VI vowed to "revamp the domain of religious affairs in order to shield Morocco against the perils of extremism and terrorism."
The newly appointed Ulema Councils are expected "to protect [Moroccans'] faith and minds against those who have strayed and those who distort the truth," the king said. It will nonetheless take years to educate the state's clerics to effectively counter the rise of conservative clerics.
Indeed, "rebellious" clerics were drawing crowds, attracting people away from state-controlled mosques. In response to the influence of these self-proclaimed clerics, new departments have been created in the Ministry of Religious Affairs to oversee the administration of the kingdom's mosques and the modernization of religious education.
Last year, several preachers accused of inspiring the Casablanca bombings that killed 33 people were sentenced to as many as 30 years in jail, while others have been prevented from delivering sermons by authorities.
But while there is strong political will to target the foreign Wahhabi doctrine, analysts say a strict control of mosques cannot totally prevent the spread of radicalism.
"It's not enough to control mosques to control [Wahhabism]," argues Mr. Darif. "The problem of the mosques is a fake problem. If we could put an end to this Islamist rise through the control of mosques, we would have done it [way before]."
The key issue today is how to control clerics without discrediting their state-sanctioned speech and frustrating the population.
If you exercise too much control, "you loose the commitment, the charisma. It is a problem posed to all religions. There's an equilibrium that has to be found," says Mohamed Tozy, a university professor and an expert on political Islam.
The 12 suicide bombers who carried out last year's attacks were indoctrinated in so-called "garage mosques" that flourished in remote neighborhoods.
Most of those have now officially been closed and local authorities have increased efforts to keep a watch on official mosques to secure their closing between prayer hours.
But as Darif puts it, "If you close a garage, people will go to their living rooms or their balconies. It does not change anything to close garage mosques. Extremism is not in mosques."
Facing severe repression, religious extremists now reportedly avoid gathering outside mosques and arrange meetings in their homes or in public places in remote neighborhoods.
Last year's bombings prompted Moroccan authorities to crack down on Islamist ranks, jailing groups of men solely based on who their acquaintances are. About 2,000 people have been charged, while more than 900 have been sentenced in connection with the attacks, prompting criticism from human rights organizations and local Islamist leaders.
"People are arrested because they belong to a sphere of influence," says historian Mohamed El Ayadi. "Is this a crime? That's the debate."