Morocco is seen as promoting a more tolerant form of Islam than some Arab countries, and woman in cities and towns often eschew the Islamic veil in public.
While the countryside is somewhat more conservative, attitudes to female dress vary according to local social and cultural customs and in the cities many women don Western-style clothes.
Omar al-Kazabri, imam of Casablanca's Hassan II mosque, Morocco's largest house of worship, said there is a growing trend among women across the country to go about "unclothed".
"Nudity is no longer confirmed to season, it is spreading before our eyes in winter and summer," he said on his official Facebook page earlier this week.
"Look at the streets. It breaks your heart to see the situation we find ourselves in. Obscene nudity (is an) affront to God's commandments and an insult and an outrage to the population," he wrote.
Signup to our newsletter and follow us on Facebook and Twitter!
"Young women, unclothed, smoking cigarettes. Where are their guardians?" he asked.
And he warned that "impudent women could go to hell".
Kazabri said what he calls "nudity" is part of a "conspiracy" against Morocco by people who wish to "kill modesty, values and principles".
The outburst from one of Morocco's most prominent clerics was criticised in the media.
"What's gotten into him?" the private news site Media24 asked on Thursday.
It said such remarks are "scary" coming from a top cleric.
Another private site, Telquel, said Kazabri had a "peculiar concept of nudity".