MOGADISHU, Somalia -- Al-Qaida-linked militants detonated several bombs and breached the main U.N. compound in Somalia's capital Wednesday, sparking gunbattles that killed at least 12 people. A U.N. official said at least three foreigners were believed to be among the dead.
The attack comes only six months after the United Nations expanded its presence in Mogadishu, where it had kept only a small operation because Islamic insurgents had controlled much of the capital until being pushed out in an offensive in 2011.
Al-Shabab said on its Twitter feed shortly after Wednesday's attack began that its fighters "are now in control of the entire compound and the battle is still ongoing."
African Union and Somali security forces responded and took control of the compound about an hour later. The U.N. staff who sought refuge in the bunker then were evacuated to the secure military base and airport complex across the street, Parker said.
A U.N. official, who insisted on anonymity because he was not an official spokesman, said he believed three foreigners were killed: one Kenyan and two South Africans.
"There was not very much time to get into the safe area," said another U.N. official, Ben Parker, a spokesman for the United Nations Assistance Mission in Somalia.
The top U.N. official on Somalia, Nicholas Kay, also works out of the building but was not inside the compound when it was attacked.
At 11:30 a.m. the compound was rocked by the first explosion. At least two others followed, Parker said. Dozens of staff from U.N. humanitarian and development agencies were in the compound and many were moved to the secure bunker, he said.
Mohamed Ali, an ambulance driver, said he transported five dead civilian bodies and 10 people who were wounded.
An Associated Press reporter who went inside the U.N. compound after the battle saw two dead bodies of what appeared to be al-Shabab attackers wearing Somali military uniforms. An official said seven attackers died in total.
Somali Prime Minister Abdi Farah Shirdon said he is appalled that "our friends and partners" at the U.N. who are carrying out humanitarian activities would be the victims "of such barbaric violence." An African Union official, Mahamet Saleh Annadif, condemned the "cowardly" attack and sent condolences "to those who had lost loved ones."
The U.N. has had only a small presence in Mogadishu in recent years. In December, though, U.N. Secretary-General Ban Ki-moon touched down in Mogadishu wearing a bullet proof jacket to announce a return of the U.N.'s political office to the seaside capital.
That security measure was necessary because of al-Shabab, the al-Qaida-linked militant group.
One of the three blasts included a car bomb that largely blew down the compound's front gate. Inside walls were scarred with bullet marks.
The attacked compound just across the street from the secure airport complex, where U.N.-backed African Union military forces are based. The U.N. compound is used by agencies like UNICEF, WHO and UNDP.
Mogadishu fell into anarchy in 1991 and is just beginning to move past years of sustained conflict. The U.N. and foreign embassies were absent from Mogadishu for close to two decades.
African Union forces pushed al-Shabab out of Mogadishu in August 2011, meaning residents didn't have to live through daily battles for the first time in years. An international presence slowly began to return and the U.N. began the process of moving its personnel from the nearby capital of Nairobi, Kenya, back to Mogadishu, a process that has accelerated in recent weeks.
International embassies -- from Turkey and Britain, for example -- followed. Wednesday's attack underscores the fragile security situation and will force the U.N. and embassies to review their safety plans and decide if they have enough defenses to withstand a sustained al-Shabab assault.
Fadumo Hussein, a shopkeeper who was sitting inside her shop near the scene of the attack, described a narrow escape.
"It started with an earsplitting explosion, followed by heavy gunfire," she said, showing holes made by bullets on her shop. "I crouched and then crawled like an animal. I am very lucky. It was a shocking moment."