"They were attacked and burnt to death by a mob of villagers who accused them of engaging in witchcraft," the police chief for the western Kigoma region which borders Burundi, Jafari Mohamed, told AFP.
"Five of those killed were aged over 60, while the other two were aged over 40," he added.
Among those arrested on suspicion of carrying out the killings was the local traditional healer, or witch doctor.
Relatives of those killed described horrific scenes, with the bodies of family members hacked with machetes or burned almost beyond recognition.
"When I returned home in the evening, I found the body of my mother lying 10 metres away from our house, while the body of my father was burnt inside the house," said Josephat John, according to Tanzania's Mwananchi newspaper.
The attack in the village of Murufiti took place on Monday but reports only emerged after police announced the arrest of the suspects.
"We are holding 23 people including local leaders in connection with the attack," Mohamed said.
"They will appear in court to face murder charges."
Belief in witches and black magic remains strong in many parts of Tanzania.
A local rights group, the Legal and Human Rights Centre (LHRC), has estimated as many as 500 "witches" are lynched every year, based on reports that counted some 3,000 people killed between 2005 and 2011.
Many of those killed were elderly women, the centre said.
The rights group said some are targeted because they have red eyes - seen as a feared sign of witchcraft, even if they in fact that is the result from the use of dung as cooking fuel in impoverished communities.
The centre said that many local people believe that witchcraft is behind every misfortune - from infertility and poverty to failure in business.
Past attacks have included a series of bloody assaults against albinos, as well as against young children.
In Tanzania, albinos are killed and dismembered because of a widespread belief that charms made from their body parts bring good fortune and prosperity.
COMMENTS (2)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ
This Tanzania incident is like those in medieval, religious Europe when people believed in this type of superstition and burned suspected witches alive.
At least in Saudi Arabia today witches are executed after a trial.
To think that people who perpetrate such heinous acts are allowed to vote and to procreate. I though we had progressed past this a couple of hundred years ago. I give up any hope for the African continent and the majority of its people.