The dead included three civilians and a soldier and four attackers also died during the attacks in Niger's southeastern region of Diffa, the sources said.
Niger, Cameroon and Chad have all suffered a spill-over of violence from Boko Haram's northern Nigerian strongholds.
Niger has arrested at least 1 100 suspected Boko Haram militants this year and has placed its Diffa region under a state of emergency.
Diffa, which borders Nigeria, has suffered at least 57 attacks since February, statistics published by the UN on Friday showed.
At least 150 000 refugees seeking protection from Boko Haram attacks in Nigeria live in Niger's Diffa region.
An 8 700-strong multinational force comprising troops from Niger, Nigeria, Benin, Cameroon and Chad will begin operations against the militants at the end of this month when the rainy season is expected to stop, Chad's President Idriss Deby said recently.
The force is due to receive US support, including training, worth $45m.