Sorcery, plate-smashing and animal sacrifice are not often associated with Sufi festivals, but they all feature at a popular annual pilgrimage to a Moroccan shrine linked to the "queen of the genies".
In the town's main square, to a chorus of trilling pipes and banging drums, spectators press around a cluster of believers, who sway to the hypnotic rhythms in a trance-like state, sometimes leaping up and down in ecstasy, sometimes cutting themselves on the scalp with sharp tools.
One of the men runs into the middle of the circle, holds up a large terracotta plate and throws it high into the air. It shatters as it lands on his head, prompting a loud cheer from the crowd.
The festival of Sidi Ali Ben Hamdouch brings Moroccans from far and wide to venerate a 17th century Muslim saint and his servant Lalla Aicha, a mythical Muslim princess from the desert who dwells in the spirit world and is a powerful unseen force for her followers.
Traditionally, worshippers have come to Mghrassyine for spiritual guidance and divine blessing, sometimes seeking higher states of consciousness through music and dance, as a form of communion with God.
But for a growing number of people, the week-long religious festival, or "moussem", is a journey into the supernatural world of genies, incantations and "shawafa" -- women who claim to be able, for a fee, to help people find love and feel better, to maybe cast or break a spell.
Land of superstition
Madame Khayat, from the city of Fez, says she comes every year, despite the disapproval of many Moroccans, including her husband.
"We come here to be purified of the evil spirits, of the 'jinn,'" she says with a smile.
"It's a kind of pilgrimage if you like. People go to Mecca to be purified of their sins. People come here to be purified of evil spirits."
"There are many people who think it's savagery, who don't believe in this. Even my husband doesn't like me to come here. So when he wasn't looking, I just got in the car and came with my two maids," she adds with a laugh.
The spirits hold a special place in Moroccan folklore and popular culture, and not just among the poor and uneducated.
A study published in 2012 by the Pew Research Centre, a US think tank, showed that an estimated 86 per cent of Moroccans believe in these supernatural beings, more than any of the other countries surveyed.
Aziz Hlaoua, a Moroccan sociologist, says that under King Mohamed VI there has been a clear revival of Sufism, the beliefs and practises of mystical Muslim sects, which in Morocco are commonly linked to the world of magic and healing.
In 2002, the king appointed Ahmed Toufiq, known for his Sufi sympathies, as minister of religious affairs, to pioneer this revival and reverse the marginalisation of Sufi fraternities under his father, the late king Hassan II.
"The political role of this new policy of favouring Sufism as a moderate, open, tolerant form of Islam is a means of confronting extremism," Hlaoua said.
"And the moussem have seen a continuous comeback since Ahmed Toufiq's appointment as minister."
Music and meditation
On the last day of the Sidi Ali festival, thousands gather to accompany a procession of flag bearers and drummers as they lead a sacrificial bull donated by the king down the hill to the shrine of Sidi Ali.
Other creatures, notably black chickens and goats, the colour supposedly favoured by Lalla Aicha, are on sale around the town, to be slaughtered as part of an Islamic tradition that has assumed occult overtones in Mghrassyine.
An alleyway winding down to the valley below the shrine is lined with evidence of sorcery -- "shawafa" salons and stalls selling festival accessories, from goat horns to dried chameleons, which are placed in boiling water to produce healing vapours.
At the bottom of the path, women light prayer candles and burn incense in the cave of Lalla Aicha, calling on the so-called queen of the genies to intercede on their behalf, or they purify themselves with a ritual bath in the adjacent natural spring.
Two sheep lie dead on the ground nearby, their throats slit.
A more cerebral atmosphere prevails in the room, not far from the shrine, where members of the Sidi Ali fraternity congregate for an evening of spiritual music and meditation, or "lilla."