Gunmen killed six security agents in southwestern Niger, a security source and local resident said, in an area near the Malian border where jihadists have been increasingly active.
The attackers opened fire on a security post in the town of Abala, about 150 km (90 miles) northeast of the capital Niamey, at around 7 p.m. (1800 GMT) on Wednesday, killing four national guard troops and two gendarmes, a security source told Reuters.
"Just when everyone was preparing to break the Ramadan fast, we heard shots in the town. The exchange of fire lasted almost two hours," a school teacher in Abala told Anafi, a local radio station.
Militants and criminal gangs have long operated around the vast, desert border between Mali and Niger, even after a French-led military intervention pushed insurgent groups back from northern Mali in 2013.
Earlier this year, Niger declared a state of emergency along a portion of the border where Wednesday's shooting took place.
Abala is home to a camp for refugees who have fled violence in Mali. Repeated attacks in the Tillabery region near the border have led authorities to impose a 6 p.m. to 6 a.m. curfew.
Several French soldiers from a regional counter-terrorism operation were wounded on Thursday morning in a mortar attack on a United Nations' peacekeeping camp in northern Mali.
Further south, Niger also faces threats from the Nigerian Islamist group Boko Haram. Niger security forces killed 57 Boko Haram militants in April who had attacked a village in the southeastern Diffa region.