The state security commissioner said troops opened fire before forcing the attackers to flee.
Dozens of people have been killed in three separate attacks in various states in northern Nigeria.
In the northwestern state of Kaduna, at least one person was killed and seven others were injured when gunmen attacked a village.
Unidentified gunmen attacked Madamai village in Kaura … Residents have been confirmed dead after the attack. Seven others were injured, “said Samuel Irwin, the state’s security commissioner.” The attack took place late Sunday night.
He said the soldiers fired before forcing the attackers to retreat after an intense exchange.
Aruan added that two people were being questioned on suspicion of involvement in the attack.
Also in Kaduna, gunmen attacked a church in Kachia district on Sunday.
“One person was killed and several worshipers were seriously injured,” Aruwan said in a separate statement.
In the northwestern state of Socotta, 22 Nigerian security personnel were killed in an attack on a remote army base.
State Assembly member Aminu Gobir told Reuters that 117 bodies were recovered on Sunday and five more on Monday. The dead included 14 soldiers, five police officers and three members of a civilian defense force, he said.
The Nigerian military says suspected Islamic State-backed fighters and criminals are behind the attack.
The Islamic State of West Africa group has been active in the northeast since 2001, thousands of miles from the northwest.
Criminal gangs locally known as bandits have been terrorizing northwestern and central Nigeria for years, but in recent months they have become more ruthless and the military is conducting new operations in the region.
These bandits raided villages, stole cattle, kidnapped for ransom, and burned down homes.
But analysts see signs of growing cooperation between gangs and armed fighters fighting the 12-year campaign in the Northeast.
The military launched an anti-piracy operation in the state of Zamfara earlier this month, and other northern states have imposed restrictions on movement and trade, as well as telecom blackouts, in an attempt to control gunmen.
The armed robbers fled their camp in Zamfara and fled to neighboring states, officials and residents said.