The gangs trying to steal cattle shot dead 15 people in clashes with local residents in six remote villages of Zamfara state on Tuesday, regional police spokesman Mohammed Shehu.
The bandits returned on dozens of motorcycles on Wednesday and killed 6 mourners at funerals for the earlier victims, he added.
Banditry, kidnapping and other crimes have become widespread recently in the country's northwestern region, according to local reports.
On Thursday, the country’s President Muhammadu Buhari ordered the army to enhance their operations to end frequent attacks by gunmen and criminal gangs in the country.