Mali and Niger forces were carrying out a joint operation when a patrol was attacked Monday by "terrorists" near the northeastern town of Tabankort, the army said on social media.
According to the military the total toll was "24 dead, 29 injured and material damage" while 17 of the jihadists were killed and a hundred more suspects captured.
The prisoners are in the hands of Niger soldiers, the statement said.
In an earlier statement, which gave a lower death toll, the army said French and Niger forces took part in a counterattack.
Monday's action was another heavy loss for the army, which lost a hundred soldiers in two jihadist attacks in a month in the autumn.
Northern Mali fell into the hands of jihadists in 2012 before the militants were forced out by a French-led military intervention.
Since then, however, the border regions of Mali, Niger and Burkina Faso have become the theatre of repeated clashes with jihadist fighters.
Mali's army has been struggling to contain the Islamist insurgency despite help from African neighbours, MINUSMA, the 13,000-strong UN peacekeeping mission in Mali, and former colonial power in the region France.
French Prime Minister Edouard Philippe in a visit to neighbouring Senegal on Monday, called on all west African states to help tackle jihidist groups operating in the Sahel.
"One thing is certain: jihadist groups will benefit, as soon as they can, from our weaknesses, from our lack of coordination or from our lack of commitment or training," said Philippe, at the opening of the Dakar International Forum on Peace and Security.
French President Emmanuel Macron has pledged to take decisions "in the coming weeks" on how France can help tackle jihadist violence in the Sahel.
He said progress had been made "on the security situation" and decisions would be announced on revamping the G5 regional cooperation force in Mali, Burkina Faso and Niger.
France earlier this month also announced their troops had killed a top jihadist leader in Mali, described by the defence ministry as the second most-wanted terrorist in the Sahel.
Moroccan Ali Maychou belonged to the Group to Support Islam and Muslims (GSIM) in Mali, which has claimed responsiblity for some of the biggest attacks in the Sahel.