Malian and Nigerian government forces were carrying out a joint operation when a patrol was attacked by terrorists near the northeastern Malian town of Tabankort, the army said on social media.
"During this attack, Malian forces suffered 24 deaths, 29 wounded, as well as equipment damage. On the enemy's side, 17 were killed and a certain number captured," army spokesman Diarran Kone said.
The captured suspects are in the hands of Niger soldiers, the statement added.
The West African country is still reeling from an attack on an army post that killed 54 in early November. It was one of the deadliest strikes against its military in recent memory, which underscored the increasing reach and sophistication of armed jihadist groups active in the wider region.
The attack on the Malian patrol on Monday was in Tabankort, Gao region, while on a joint Malian-Nigerian operation against militants operating near the border.
The authorities have not named the assailants or identified which group they belonged to. From strongholds in Mali, groups with al Qaeda and Islamic State links have been able to fan out across the Sahel, destabilizing parts of Niger and Burkina Faso.
Violence across the Sahel border regions
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 been struggling to contain the Islamist insurgency despite helps from international community.
In addition to November's bloodshed in Mali, 38 Malian soldiers were killed on Sept. 30 in coordinated attacks on two army bases in the center of the country, which has slipped from government control despite the presence of the French army and other international forces.
Meanwhile, 39 people were killed in Burkina Faso on November 6 when militants attacked a convoy carrying workers of Canadian gold mining company Semafo.
According to the UN, more than 1,500 civilians have been killed in Mali and Burkina Faso since January this year, with millions more in need of humanitarian assistance.
Mali is also a member of the G5 Sahel, a counter-insurgency force comprised of troops from Mauritania, Mali, Niger, Burkina Faso and Chad. However, efforts by G5 have been compromised by insufficient funding, training and equipment.
Right now, a 15,00-strong UN peacekeeping force is stationed in Mali. West African leader have pledged one billion dollars over the next five years to combat the Islamic militancy in this region. French President Emmanuel Macron has also said more military resources will be allocated to Mali from 2020.
(With input from agencies)