The musicians fighting back against extremism
Morocco's Gnawa festival attracts hundreds of thousands of people - but it's about more than music and colour. It has come to symbolise the fightback against Islamic State and extremism.
It's a gloriously noisy, colourful festival, and it starts with a procession of Gnawa musicians through the narrow streets of the walled medina of Essaouira, the ancient fishing port on the Moroccan Atlantic coast.
Each Gnawa group, or Islamic "brotherhood" is dressed in different, elaborate coloured robes. They sing, breaking off for whirling dance routines, and are accompanied by hand drums and deafening metal castanets.
There may be seven or more musicians in each group, and each is led by a Maalem, a Gnawa master. He leads the singing and plays the gimbri. Constructed from walnut wood and skin from the throat of a camel, it looks and sounds a bit like an ancient African bass guitar.
After the procession come the concerts. They start in the evening, often don't finish until three in the morning, and take place at five locations around town.
The main stage is in Moulay Hassan, out towards the fishing port. This is where the best-known international musicians and Gnawa groups play - and then often collaborate together in unique fusion sessions - watched by crowds that stretch back to the sea wall and the little bars and restaurants surrounding the square. There's another stage on the beach, one on the rooftop of an old fort, and an indoor venue for intimate Gnawa sessions.
This is where Maalem Abdelslam Alikkane is playing. He lives here in Essaouira and makes his living as a carpenter, making musical instruments, especially - of course - the gimbri. "There was a time when this was considered to be slave music. It was considered to be trash," he says. But the festival has changed all that.
"Now we are considered as artists, and everyone knows who we are." About a third of the Maalem can now make a living from the music alone, "and that was previously impossible". They are now officially recognised as musicians.
The Gnawa are devout Muslims, but their religion, like their music, is something of a fusion. Their belief in the spirit world, and the power of music to heal through trance ceremonies, is a reminder of their links with West Africa.
Alikkane and the other masters of course take part in religious ceremonies, or lila, but these are not part of the festival. "They last all night, and involve sacrifices of a cow or goat," he says, "and we don't like them to be filmed. And there should be someone there who is sick or has to get rid of bad energy."
Even so, it's not uncommon for those attending the late night indoor Gnawa sessions at the festival to fall into a trance under the hypnotic power of the music.
When the festival started, the aim was simple - to help the Gnawa, and to boost tourism. This year it was estimated that 250,000 people visited the festival over the four days.
Nearly a third of the funding for the free event is provided by the government, and the rest comes from corporate and private sponsors. "Every euro put in as sponsorship generates 17 euros spent in Essaouira - and tourism has brought more jobs," says festival director Neila Tazi, .
But this year, the festival has a new significance, showing that music and Islam can co-exist at a time when Islamic State and its supporters aim to destroy any events like this.
Across the Sahara, in northern Mali, the celebrated Festival In The Desert has been postponed since 2012 because of security concerns following the Islamist uprising. And along the Mediterranean in Libya, Islamic State militants this year burned musical instruments - drums, brass and woodwind - that they had confiscated under their interpretation of sharia law.
The Gnawa were of course horrified. "They are ignorant," says Alikkane. "They don't know what they are doing. They are stupid. Islam is not that. It's peace, music, colour, respect… it respects other religions."
Neila Tazi sees the situation in broader terms. Born in the US, she produces music and film events, and for her the Gnawa festival, and other events like the Fes Festival of Sacred Music have come to symbolise contemporary Morocco and its place in the Islamic world.
"People are afraid of Islam", she says. "But this kind of event shows the real Islam in Morocco, the positive Islam. When we started 18 years ago we were criticised by the Islamists in Morocco, they didn't like the way young people were dressing, or the dancing. But now some of them are in the government and they support what we do. It's a popular event.
"We have to show that Islam can be different, and Morocco has made this choice." She says Morocco is fighting back against Islamic State, adding, "This festival is a big part of that fight back."
How to listen to From Our Own Correspondent:
BBC Radio 4: Thursdays at 11:00 BST and Saturdays at 11:30 BST
Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.