It's Sunday night in downtown Algiers and thousands of young people swarm the streets, cheering and dancing to the beat coming from a makeshift stage.

This is a scene seldom witnessed in a city scarred by years of conflict between the government and Islamist insurgents. Most nights, the streets of Algiers are almost deserted except for armed police manning checkpoints.

After nearly two decades of bombings and ambushes, the violence has subsided enough for Algerians to embrace an unfamiliar concept: Having fun.

For two weeks, this former colonial city has been hosting a festival of African dance, theatre, music and art designed to let the world know normal life is slowly returning to Algeria, and to allow people to let their hair down.

"Algeria needs to have some fun after a decade of blood and tears," Zouaoui Benamadi, communication chief officer for the Pan-African Cultural Festival, said. "Conflicts and wars are behind us, let's focus on the future."

However, for some people in conservative and Muslim Algeria the hedonism has gone too far. One newspaper said a performance by scantily-clad female dancers from sub-Saharan African was "obscene" and asked why censors did not intervene.

Throughout the 1990s, Algeria was the battleground for a conflict between Islamist rebels and government forces in which 200,000 people were killed, according to estimates from non-governmental organisations.

Many of the rebels have laid down their arms but a hard core, now operating as al Qaeda's North African wing, still mounts sporadic attacks on government targets.

The insurgents carried out their deadliest attack in nearly a year last month, ambushing a police convoy and killing 18 paramilitary police officers and one civilian, officials said.

About 22,000 additional police have been deployed to thwart attacks during the festival.

The fact that it has gone ahead at all shows the improvement in security in the capital, even if violence persists elsewhere. Algiers has not suffered a serious attack since the bombing of UN offices killed more than 40 people in December 2007.

The festival organisers said they brought together about 8,000 artists from 48 countries, including acclaimed Senegalese musician Youssou N'Dour, reggae singer Alpha Blondy and Grammy-winning Cape Verdian singer Cesaria Evora.

The only previous time the Pan-African Festival has been staged was in Algiers 40 years ago.

Many Algerians said the money spent on the festival this time would have been better used combating unemployment.

"It is a waste of money," said 25-year-old Mohamed Amraoui, one of the 70 per cent of Algerians under 30 who are without work, according to unofficial estimates.

Television journalist Ghania Bessai said it was worth the expense.

"Attending concerts where ... (all these artists) were performing could happen once in your life. It was a great festival," she said.

Algeria has a political motive, too, in staging the festival: To use the power of cultural diplomacy to enhance its influence in Africa.

The continent's second-largest country by land area and one of its richest, Algeria often identifies itself more closely with Europe and the Middle East than with Africa.

Its regional rival Morocco has established itself as a centre for African culture, holding music festivals each year which attract tens of thousands of young people and often give top billing to African musicians.

Now Algeria wants to re-connect with its African heritage.

"Don't forget that Nelson Mandela was trained in Algeria's mountains in the 1950s," a senior official from Algeria's Foreign Ministry said.

"If you don't believe me, go to visit the Army Museum. There is a picture of Mandela with his Algerian instructors."

Abdelkader Messahel, Algeria's minister delegate in charge of African affairs, said his country wanted to play a central role in development projects on the continent. These include the Trans-Saharan pipeline, a project to supply Nigerian gas to Europe via Niger and Algeria, at an estimated cost of more than seven billion euros.

"Africa for Africans has always been our motto," said Mr Messahel.

However, embracing African culture during the festival has proved challenging for some Algerians.

The Sahara desert isolates Muslim, Arabic-speaking North Africa from the rest of the continent and over the centuries has limited the mixing of peoples and cultures.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.