"They cut the throats of 25 people from two extended families," a doctor at a hospital in the area told Reuters news agency.
The doctor and other officials at the hospital quoted relatives of the dead as saying the radical Islamic Armed Group (GIA) carried out the attack. He added that a 20-year-old woman had been abducted.
The massacre brought the number of killings in Algeria this month to more than 90.
More than 100,000 people have died since 1992, when the GIA began an armed insurgency following the cancellation of a general election in which radical Islamists had taken a commanding lead.
Renewed attacks
A BBC correspondent says that after a lull last year, village massacres and attacks against travellers on country roads have returned to terrify the residents of western and central areas of Algeria.
Much of the violence against civilians is blamed on the GIA, a network of militants which operates out of the mountains in the western provinces.
Hundreds of GIA members surrendered more than a year ago to take advantage of an amnesty offered by President Abdelaziz Bouteflika. The president had launched what he called a civil concord initiative, which now seems to be in tatters.
In recent weeks, Mr Bouteflika has been facing a fierce campaign of criticism in the press and even by parties in the government coalition. Critics allege that his amnesty has encouraged the armed militants to increase their attacks without fear of punishment.
Atmosphere of crisis
However, observers say the real reason for the criticism is that relations are tense between Mr Bouteflika and the powerful army officers who put him in his position.
The president has been trying to increase his influence by appointing those loyal to him in key positions.
The mounting violence and the rumours of disputes at the top are now creating an atmosphere of crisis, something which Algerians thought they had left behind when Mr Bouteflika came to power.