Additional U.N. personnel may still be missing, said a U.N. official who spoke on condition of anonymity because of lack of authorization to speak to the press.
The militants first targeted the army camp in Sevare on Friday but when they faced resistance they moved to the nearby Hotel Debo before assaulting the Hotel Byblos, popular with U.N. staff, to take hostages, said a Mali government report, according to the U.N. official.
Sevare, a garrison town about 600 kilometers (375 miles) northeast of the capital, Bamako, is at the heart of Mali's tourism industry and up until now had not been targeted in the attacks more common in the northern towns of Gao and Timbuktu.
"It's a troubling sign that the armed Islamist groups are intent on stepping up the pressure both on the Malian government and on the U.N. and French presence," said Bruce Whitehouse, Mali expert and associate professor at Lehigh University. "They want to show they are not just contained within the north and that they're not afraid to confront their primary enemies where they're strongest."
Whitehouse said the attack was likely intended "to signal all Malians everywhere that neither their government nor the U.N. can keep them safe," but noted the rapid response by Mali's forces.
The attackers may be elements of Amadou Koufa, a leader who has been linked to attacks on Mali's army including a January attack that killed 10 soldiers in Nampala, said Col. Souleymane Maiga, chief spokesman for the military.
|A Malian soldier runs for cover as he fights after clashes erupted in the city of Gao|
The four rescued U.N. employees are two South Africans, a Russian and a Ukrainian, said U.N. mission in Mali spokeswoman Radhia Achouri.
"Our contractors survived because at no time was their presence discovered by the terrorists in the hotel," she said adding there was not much resistance Saturday morning during the rescue by special forces.
The 12 dead include three civilians, five Malian soldiers, a U.N. contractor and three attackers, according to the U.N. and Lt. Col. Diarran Kone.
A 38-year-old South African who died in the attack worked for an aviation company that was assisting the U.N. contingent in Mali, Nelson Kgwete, spokesman for South Africa's foreign ministry, said on Twitter.
Four citizens of Ukraine were among those captured during the attack and one of them was killed, said the Ukrainian Foreign Ministry. One of the Ukrainians escaped, while the two others were freed during the operation and are safe, the ministry statement said.
The government said Friday that forces detained seven suspected militants.
Islamic extremists took over Mali's north in 2012. A French-led offensive ousted them from the northern cities in early 2013. Remnants of the extremists have staged attacks on U.N. peacekeepers and Malian forces.
Mali's jihadi groups have been stepping up their attacks further south. The most recent extremist attack in the capital occurred in March when masked gunman opened fire in a restaurant popular with foreigners, killing five people.
Petesch reported from Dakar, Senegal. Associated Press writer Christopher Torchia in Johannesburg and Lynn Berry in Moscow contributed to this report.