Ten soldiers were slightly injured in the exchanges which broke out late Sunday after a large group of militants arrived on motorbikes and cars, a member of the security forces said.
The Boko Haram fighters were "clearly well-trained and certainly well informed about our positions," the source said.
Boko Haram kills eight, abducts women in NorthEast Nigeria
The fighting took place in Gueskerou, a village in the West African country's southeastern region of Diffa bordering Nigeria, from where a bloody uprising by Boko Haram fighters has spilled over.
Government forces are working to identify the body of one of those killed who is believed to be a Boko Haram leader, according to the source.
Boko Haram torches military base a day after farmers killed
The military pushed the fighters back towards Nigeria and seized firearms, munition and three vehicles, including one equipped with a mounted weapon stolen from the military in the town of Bosso last June, the source added.
Boko Haram's insurgency began in northeast Nigeria and has spread to Chad, Cameroon and Niger, claiming more than 20,000 lives and displaced 2.6 million people. Niger declared a state of emergency in Diffa, home to more than 300,000 refugees and internally displaced people.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ