That attack was claimed by the Islamist group Al-Qaeda in the Islamic Maghreb (AQIM), which is active in the region.
It was not clear how many of those killed in the latest attack were military. A hospital source told Reuters news agency 16 soldiers had been killed and two civilians.
Political violence has subsided since the 1990s when more than 150,000 were killed after the 1992 election, won by an Islamist party, was annulled.
But militant groups continue to carry out sporadic attacks.
THIS ATTACK WAS NOT BECAUSE OF BUSHCHENEYCHIMPY MCHALLIBURTON ISRAELI ZIONIST TEA-PARTY RACISTS.
MUSLIMS HAVE KILLED MORE MUSLIMS THAN NON-MUSLIMS HAVE KILLED.