Somalia's new President Hassan Sheikh Mohamud and the visiting Kenyan foreign minister escaped unharmed on Wednesday from an apparent suicide bomb attack on a Mogadishu hotel where they were holding a news conference, witnesses said.

The attack, in which two explosions shook the Somali capital, underscored the huge security challenges facing Mohamud after the first presidential vote in Somalia in decades which raised hopes for change after 20 years of violent anarchy.

A Reuters witness said two bodies could be seen outside the hotel, one of whom appeared to be a suicide bomber, and there was a large crater in the road.

Mohamud and 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 said moments after the blasts.

There was no immediate claim of responsibility. On Tuesday, however, al Qaeda-linked Somali militants branded Mohamud a "traitor" and vowed to continue their jihad against a government they say serves only Western interests.

Mohamud's election by Somali lawmakers was hailed by his supporters as a vote for change in the war-ridden Horn of Africa country that has lacked effective central government since 1991.