According to police reports, the incident happened on Friday at Dankar and Tsauwa villages in Katsina State.
An armed gang on motorbikes killed at least 30 people in attacks on two villages in the northwestern Nigerian state of Katsina, police said on Saturday.
Twenty-one people were burnt to death and nine villagers were shot dead on Friday evening in the villages of Dankar and Tsauwa as the assailants made off with food and livestock, the police said.
The ward head of Tsauwa, Salisu Lawal, said residents were preparing for Magrib, the islmaic 7:00pm prayer, when the bandits attacked.
“Yesterday (Friday) when we were preparing for the Magrib prayer, we heard that bandits were attacking Dankar village," Lawal told the news agency Sahara Reporters.
“Unknown to us that they were also coming to this village, we saw them in large number; some of them trekking, some riding motorcycles," he added.
Police commissioner, Sanusi Buba confirmed the death toll and said that police and military teams had been deployed to the village, adding that an investigation is under way.
He also said that those killed by the assailants were mostly elderly women and children, who could not run while other villagers fled.
Hundreds of people have been killed in the northwest of Nigeria since last year, in attacks the government attributes to bandits - a loose term for gangs of outlaws carrying out robberies and kidnappings.
Security experts say Nigeria can ill afford more instability as it is already struggling to contain Islamist insurgencies in the northeast, conflict in central states and militant groups in the Niger Delta to the southeast.
However, the death toll from violence continues to rise in Nigeria, along with incidents of kidnapping and robbery.