Two suicide bombers infiltrated Jazeera hotel near Adan Adde International Airpirt in Mogadishu-but the president and his visitor escaped unhurt.
Only one suicide bomber managed to detonate his explosives while the other one was shot dead by government forces inside the hotel before detonating himself.
Reports say one of the suicide bombers posed himself as a government soldier by wearing government military fatigue.
Three people died including the two suicide bombers and a Ugandan solider serving the African Union force in Somalia. A Somali soldier was also seriously wounded.
The explosions were presumably targeting the president who was meeting Kenyan foreign affairs officials.
Reports say gunmen also attacked the hotel immediately after the explosions went off and several of them were reportedly gunned down by Somali forces keeping vigil outside the hotel where the president was attacked.
Mohamud and the Kenyan Foreign Affairs Minister Sam Ongeri continued the news conference for several minutes after the blasts.
“First and foremost we will address the security issue. Priority number one is security and priority number two and priority number three,” Mohamud was quoted by Reuters moments after the blasts.
No group has claimed the attack but suspicion is likely to fall on Al-Shabaab militant group who dismissed his election as a ploy by the west to boost its economic and strategic interest in the country.
The militant group accused the new president for being a traitor and vowed to fight his government.
Mr. Mohamud won a landmark presidential vote in Mogadishu on Monday where he defeated the former TFG president Sharif Sheikh Hassan by 190 votes to 79 votes in a ballot of newly elected MPs.
This is the first attempt to kill the new president who faces many challenges including crushing Al-Shabaab’s insurgency and containing powerful politicians who lost their presidency bid during the Monday election.