Those killed included children abandoned by their parents during the attack in the village of Gwaska, in Kaduna state, a vigilante said.
Fighting between armed bandits and militiamen left 45 dead in northern Nigeria, police and a local militia said on Sunday, amid escalating rural violence often involving cattle rustling, robbery and kidnappings.
"The 45 bodies were found scattered in the bush. The bandits pursued residents who mobilised to defend the village after overpowering them," said a vigilante who asked not to be named for fear of reprisals.
"The dead included children abandoned by their parents during the attack" in the village of Gwaska, in Kaduna state.
"The attackers were obviously armed bandits from neighbouring Zamfara state who have been terrorising Birnin Gwari area," he added.
The Kaduna state police chief, Austin Iwar, confirmed the attack, saying: "There was violence between the militias, who are very powerful, and bandits."
He could not break down the casualties, saying only: "For now all we know is that 12 people were buried yesterday and 33 today."
The vigilante said the bandits struck at about 2:30 pm (1330 GMT) on Saturday and stayed for three hours before retreating to their base in the forest in Zamfara.
"They burnt down many homes," he said.
The killings follow the death of at least 25 people in separate attacks in northern Nigeria last week.
Thirteen people were killed in prolonged clashes between cattle thieves and local civilian militia in Zamfara.
In Adamawa, in the northeast, meanwhile, at least 12 people were killed in an attack on several villages.
The attacks underlined the diversity of Nigeria's security threats that persist in the absence of a robust police force and efficient judicial system.
Nigeria is in the grip of a security crisis as nomadic herders and sedentary farmers fight over land in an increasingly bloody battle for resources.
Rural communities in Zamfara have been under siege for several years from cattle rustlers and kidnapping gangs, who have raided herding communities, killing, looting and burning homes.
To defend themselves, villages and herdsmen form vigilante groups, but they too are often accused of extra-judicial killings, provoking a bloody cycle of retaliatory attacks.
Nigerian President Muhammadu Buhari has been criticised for failing to curb the violence, which is becoming a key election issue ahead of presidential polls in 2019.
Military and police are overstretched in Nigeria, which, along with fighting Boko Haram in the north, is battling militants and pirates in the oil-rich south, a simmering separatist movement in the east and the bloody conflict between herdsmen and farmers spanning the vast central region.
Boko Haram attack kills six on Lake Chad island
Meanwhile, a Boko Haram attack on an army checkpoint in neighbouring Lake Chad island killed six people, including four government officials and a soldier on Sunday.
The overnight killings, which cost the life of a civilian along with two customs officials, two forestry agents and the soldier, occurred when "Boko Haram elements attacked an advanced post of the Chad army" in Gabalami in the country's far west, the source said.
The attackers were "repelled" but managed to escape without suffering losses, the source added.