The country's prime minister on Thursday said that at least 27 people were arrested over what he said was their involvement in the violence in the Guerara district of the city of Ghardaia.
Among those arrested are activist Kamal Fakhar al-Din, who has been campaigning for the rights of Berber people. He was in a mosque Ghardaia before security forces stormed it and arrested him and several other people.
Makeshift barricades of tyres and wheelbarrows were erected between the rival neighbourhoods and burned out homes, shops and cars, the AFP news agency reported on Thursday.
It also said that 16 of the dead were from the Berber community and three were Arabs.
Ghardaia is situated in the M'zab valley, a UNESCO world heritage site on the edge of the Sahara that has seen mounting tensions between the two communities.
There have been on-and-off confrontations between the two communities since December 2013 over property and land ownership after a Berber shrine was vandalised.
But this week's violence was the worst so far, prompting President Abdelaziz Bouteflika to order the regional commander general to "supervise the actions of the security services and local authorities to re-establish public order".
He also asked Prime Minister Abdelmalek Sellal to punish "all violations of the law with diligence and severity" and to ensure the security of people and their goods, his office said.
But some newspapers and analysts criticised the government's response.