Somalia's president survived an assassination bid Wednesday, just two days into his new job, when bomb blasts claimed by Islamist rebels rocked the Mogadishu hotel where he was meeting Kenya's foreign minister.
Hassan Sheikh Mohamud was unharmed after two blasts went off outside the hotel where he had been staying in Mogadishu, but three soldiers were killed in what appeared to be an attack by multiple suicide bombers.
"There has been a blast around the hotel where the president was. The president is safe. All the people who were inside the hotel are safe," Ali Houmed, spokesman for the African Union Mission in Somalia (AMISOM) told AFP.
A police officer said a Ugandan soldier from the regional force and two Somali troops were killed in the attack, adding that initial reports suggested it was carried out by three suicide bombers.
Amisom confirmed in a statement that one peacekeeper had died and three were injured in the attack, which took place a few hundred yards from Mogadishu's international airport.
Two suicide bombers were shot and blew up while trying to enter the hotel, while a third bomber was shot dead as he tried to climb the compound wall, the statement said.
"The president was in no danger and continued to calmly address the media," the statement said.
An AFP reporter at the scene saw bits of flesh scattered in front of the hotel gates.
Hassan, whose election on Monday was widely welcomed as a boost to the Horn of Africa country's peace prospects, was meeting Kenyan Foreign Minister Sam Ongeri at the time of the explosions, Kenya's foreign ministry said in a statement.
"The meeting however went on succesfully after the thwarted terrorist attack with the minister Ongeri and his entourage (was) expected back to the country (in Kenya) later this evening," the statement said.
The Shebab, an Al-Qaeda-linked group which has been waging a bloody insurgency against Somalia's Western-backed government, was quick to claim responsibility for the attack.
"We are responsible for the attack against the so-called president and the delegation," Shebab spokesman Ali Mohamud Rage told AFP.
The Shebab spokesman had warned on Tuesday that his group considered as illegtimate the UN-backed process which saw newly-designated lawmakers elect Hassan.
"Nothing personal, but the whole process is like an enemy project," the Shebab spokesman had said.
European Union foreign policy chief Catherine Ashton condemned the attack.
"It is an appalling assault against both the new President of Somalia, Hassan Sheikh Mohamud, and the recent political progress in Somalia," Ashton said in a statement in Brussels.
"Monday's successful and peaceful presidential election was a clear signal of hope and change," said Ashton.
"Today's attack serves as a reminder that Somalia remains fragile. I hope that the people of Somalia and their new President will now be even more determined to realise their hopes and aspirations.
"The EU is ready to support Somalia on its new course to peace and stability."
The newly-elected 56-year-old academic's predecessors have all survived numerous assassination attempts in the war-ravaged Somali capital.
AMISOM troops have wrested control of most of Mogadishu back from the Shebab in recent months but the insurgent group has continued to attack foreign and government targets, mostly with suicide bombers.
Rage vowed that such attacks would continue "until the liberation of Somalia", where Kenya, Ethiopia, Uganda, Burundi and Djibouti have sent troops to support the government and battle the Islamist insurgency.
Hassan unexpectedly defeated incumbent president Sharif Sheikh Ahmed in Monday's vote in what was interpreted as a sign that Somali leaders wanted to break with the corruption-tainted outgoing administration.
The US State Department welcomed the peace activist's election as heralding "new era of Somali governance" while other Western powers also hailed the vote as a major milestone in efforts to restore peace.
Somalia has not had a credible central authority since the 1991 ouster of former president Siad Barre but Hassan's election came as a semblance of normality returned to Mogadishu and hopes of a recovery grew.
In his acceptance speech, Hassan promised to bring Somalia back into the international fold, but he inherits an ongoing war, a humanitarian crisis, feeble institutions and deeply entrenched warlordism.