The soldiers were part of the UN peacekeeping force known as MINUSMA and died when a suicide bomber ploughed his explosive-laden car into a bank that they were guarding.
"For the moment, we have at least two dead and several wounded among the MINUSMA African troops," the source said on condition of anonymity.
The suicide bomber also died, a regional government source told AFP earlier.
Today's attack came a day before Mali was to hold a second round of legislative elections tomorrow, the fourth time that the former French colony in west Africa has gone to the polls in less than six months.
More From This Section
The vote is the final stage in Mali's return to democracy after a March 2012 coup that threw it into turmoil and opened a power vacuum that enabled Islamists to seize the north.
Capital of the harsh Saharan region of the same name and the cradle of the nomadic Tuareg, the town has slipped from the regimented control of separatist rebels into a state of lawless anarchy which allowed the recent murders of two French journalists by Islamists.