The attacks on the Jazira hotel, one of the securest places in Mogadishu, underscore the security challenges facing President Hassan Sheikh Mohamud, whose election by lawmakers last year was hailed by many as a way to end two decades of conflict.
The first two bombs came in quick succession and were followed by heavy bursts of gunfire by Somali security forces. The third blast took place about an hour later when a bomb went off inside a car that was being searched by the military.
At least one of the first two bombs appeared to be a suicide bomber, police said.
There was no immediate claim of responsibility but the Islamist rebel group al Shabaab has carried out a campaign of attacks over the past two and a half years in Mogadishu.
The attack will be an embarrassment to the government whose survival depends heavily on a near 18,000-strong African peacekeeping force. Donors pump in hundreds of millions of dollars into the Horn of Africa country every year to provide basic services.
"This year, 2014 is going to be the strengthening of Somali forces and the elimination of the extremists," the newly appointed Prime Minister Abdiweli Sheikh Ahmed said in a statement on Wednesday.
The African forces helped drive al Shabaab out of the capital in August 2011, as well as other major urban centres, but the militants still hold sway over swathes of rural areas.
Islamist suicide bombers attacked the Jazira hotel in September last year as Mohamud was giving a news conference just two days into the job. He and the visiting Kenyan foreign minister were unhurt in that assault.
An attack on Kenyan shopping mall in September that killed dozens of people highlighted the militants ability to strike beyond Somalia's borders.