Around 4,000 French troops are deployed in Mali and neighbouring countries to fight jihadistgroups that have staged a string of attacks and kidnappings, some targeting Western nationals.
The two soldiers were from a cavalry regiment based in Valence, a city in southeastern France, President Emmanuel Macron's office said in a statement, which did not say where the attack took place.
Macron sent condolences to the soldiers' families and said the regional counter-terrorism operation had dealt "severe blows" to the enemy, the presidency added.
The deaths bring to 12 the number of French troops killed since the start of Operation Barkhane, which was launched more than three years ago to try to vanquish jihadist groups that overran northern Mali in 2012.
France intervened at Mali's request in early 2013 and succeeded in driving the extremists back into the desert but they continue to mount attacks from their rear bases in the region.