The assault came just a day after the fabled city celebrated the restoration of its greatest treasures - earthen mausoleums dating to mediaeval times that were destroyed during an Islamist takeover in 2012.
Hours of fighting followed the early morning attack on the camp in the south of Timbuktu, the source said, adding that the offensive against the attackers ended in the afternoon.
"At least four terrorists were killed, including those who blew themselves up in their vehicle, (and) three Malian soldiers were wounded and one killed," the source said.
"But we are continuing search-and-sweep operations and we will also continue patrolling to ensure the security of the local population."
More From This Section
The raid was essentially a double attack with the assailants first blowing up their vehicle at a military roadblock near the camp and a second vehicle then coming in with others who started firing.
It was a "carefully prepared" plan targeting the Nigerian contingent of MINUSMA, the UN's peacekeeping mission, the source said.
A Nigerian peacekeeper was slightly wounded along with a civilian.
Another Malian source said the camp had recently been evacuated by police officers from Nigeria but some soldiers had remained there.
A local resident said the assailants seemed to have "really prepared their plan."
"I believe that they first blew up their car so that MINUSMA forces would come out to inspect the damage, in order to attack them again," he told AFP, referring to the UN peacekeeping mission in Mali.
A Malian soldier was killed last month in an ambush on the outskirts of Timbuktu in continuing violence in the sprawling arid north of the country.