The series of attacks, carried out overnight Saturday to Sunday in Nigeria's far northwestern Sokoto state, saw the gangs ride out from forest hideouts, speeding into villages and beginning to shoot, dailystar.com reported.
"They opened fire on the village indiscriminately," said Abdullahi Dantani, from the village of Satiru, where 18 people were murdered.
In Sokoto state's Rabah district, gunmen rode into four villages - Rukunni, Tsage, Giire and Kalfu - massacring 25 people.
"Twenty-five people were killed," said Ibrahim Kaoje, Sokoto state's top police officer. "Several domestic animals were rustled by the attackers."
Four people were arrested in connection to those attacks, Kaoje said, "including a female informant of the gangs, who disguised as a mad woman."
In a separate wave of attacks in Satiru village, in Sokoto's Isa district, the raiders shot 18 people, and then stole animals.
"We lost 18 people in the raid by the gunmen, who came into the village on motorcycles," said Satiru village resident Umeh Na-Ta'ala.
The gangs have long been a scourge of rural communities in northern Nigeria, raiding villages, stealing cattle, burning homes, looting food, and kidnapping for ransom.
President Muhammadu Buhari condemned the killings, expressing his "deep shock and sadness over the death of scores of people in the banditry attacks," in a statement issued late Sunday.
"Perpetrators and sponsors of such dastardly acts (will) be held accountable," Buhari added.