Weeks of violence between two rival communities have swept Algeria's desert city of Ghardaia, enflamed by the destruction of a historic Berber shrine, with analysts warning of sectarian conflict engulfing the fragile region.
For more than a month, the city of 90,000 inhabitants has witnessed clashes between the Chaamba community of Arab origin and the majority Mozabites, indigenous Berbers belonging to the Ibadi Muslim sect.
Three people were killed in the violence, which both sides accused the other of starting.
Houses were looted and burned, shops and schools closed and thousands of police deployed as the authorities scrambled to contain the unrest.
"The fear is that if Ghardaia is destabilised, the entire region will find itself in a vulnerable situation," Algerian political analyst Rachid Tlemcani told AFP.
The capital of Ghardaia province is thought to have been inhabited by the Mozabites from the 11th century.
The hilltop city in the M'Zab valley, which is classified as a UNESCO world heritage site, lies 600 kilometres (400 miles) south of Algiers, not far from some of the country's largest oilfields.
The two communities have coexisted for centuries, but as elsewhere in the region, limited economic opportunities, despite the proximity of Algeria's vast oil and gas wealth, have aggravated social tensions.
Berbers represent around 30 percent of the Algerian population and have long considered themselves marginalised by the country's dominant Arab culture.
For now, calm has been restored in Ghardaia following the deployment of police and troop reinforcements.
But analysts warn that the tensions risk escalating across the M'Zab valley if the government fails to address the underlying grievances among the region's 400,000 strong population.
"Only participatory democracy ... can eliminate the risk of communal violence," Tlemcani said.
Reflecting the seriousness of the situation, Prime Minister Abdelmalek Sellal travelled to Ghardaia earlier this month to try to defuse the tensions.
But the unrest continued and the local authorities seem powerless to reconcile the feuding factions, with bitter memories of violence still fresh in the minds of the city's residents, some of whom accuse the police of complicity.
"I will be hurt for the rest of my life. That damage can never be undone," said Nourredine Daddi Nounou, referring to the destruction of the tomb of Amir Moussa.
The 16th century Mozabite leader is seen by many as the founding father of Ghardaia, explains Mohamed Hadj Said, an Algerian academic.
"It was he who undertook to integrate the (Arab) nomads in the town in 1586," he said.
Videos, shown to visiting journalists, have been circulating on the Internet of youths vandalising Mozabite property, smashing up Amir Moussa's tomb and desecrating the ancient cemetery in Ghardaia, as police look on.
Some of the ksour, or traditional villages, for which the area is famous, were ransacked and torched.
"We've asked nothing from the state since 1962 (when Algeria gained independence). Today all we are asking for is security," said Moussa, a Mozabite shopkeeper in Ghardaia's old town.
But others argue that the problems began 50 years ago, with the Chaambas winning the backing of Algeria's ruling National Liberation Front (FLN), which had led the liberation struggle against France, and branding the Mozabites as bourgeois reactionaries.
"The current situation is the result of a policy that has been pursued in this region since independence," said Mohamed Djelmami, a Mozabite writer and activist.
For his part, the head of the Chaamba community, Bouhafs Bouamer, insists a group of Mozabites orchestrated the latest violence.
The indigenous non-Arab community has always enjoyed a degree of autonomy in terms of organising cultural activities and managing its businesses, in Algeria's highly centralised economic system.
But this has also meant a lack of integration between Chaambas and Mozabites in Ghardaia, with rival football teams composed entirely along ethnic lines.
Another factor contributing to the rise in tensions is the increasing assertiveness among the younger generation, and their resentment at the perceived impunity of the drug trafficking networks they blame for the violence.
The conflict has been "fomented by drug barons," said one resident of Ghardaia, echoing the denials of others of any ethnic or religious dimension to the unrest.