The incident happened in the village of Dogon Dawa Sunday morning, Xinhua reported.
"The gunmen carried out the attack after embarking on a house to house search, shooting and killing people indiscriminately. Some of the victims were also stabbed to death by the attackers," said a police officer on the condition of anonymity.
Yushau Shuaib, a spokesman for the National Emergency Management Agency, confirmed the attack, but could not give exact casualty figures.
Police are "in the right position to give details about the gunmen attack. We are not sure if the attack was orchestrated by any group or mere armed robbers. The police will make that known to the public when they finish with investigation," Shuaib said.
Northern Nigeria has been plagued by violence in recent years, mostly at the hands of the militant Boko Haram sect.
Boko Haram attacks -- shootings and bombings -- have resulted in the deaths of 815 people so far this year, Human Rights Watch said earlier this month.