* President's election was hailed as a vote for change
* Somalia dogged by conflict for more than 20 years
* Wednesday attack shows rebel ability to strike at govt
By Yara Bayoumy
MOGADISHU, Sept 13 (Reuters) - The peacekeeper guarding the Mogadishu hotel smiled and said: "Leave your body armour behind. It's safe here."
Mogadishu was a city beginning to relax, and the soldier's advice to reporters arriving to meet Somalia's new-elected President Hassan Sheikh Mohamud reflected that. But moments into his news conference, the bombings and shooting began.
Optimists have hailed a "new era" for Somalia after decades of war, insurgency and little in the way of central government.
African Union peacekeepers forced al Shabaab militants to flee the capital over a year ago, ending the daily rat-a-tat-tat of gunfire and thud of mortars. The rebels aligned to al Qaeda hadn't struck with such a devastating suicide bomb since April.
Two days into the job, Mohamud looked at ease on Wednesday as he opened the news conference with visiting Kenyan Foreign Affairs Minister Sam Ongeri.
Then the first of two explosions rocked the street outside the Jazeera Palace hotel and bursts of gunfire rang out. Mohamud barely flinched, his eyes briefly scanning the room as journalists scrambled for cover, and the news conference continued.
But the suicide attack appeared to carry a clear warning from al Shabaab: You may think we're down, but we're not out and we can still strike at the heart of government.
The question on everyone's mind was: how could al Shabaab - which claimed responsibility for the attack that killed at least eight Somalis and AU peacekeepers - have timed it with such precision?
Mohamud's smooth election by lawmakers on Monday had strengthened talk that al Shabaab's five-year Islamist insurgency was finally being defeated.
After reporting for years on famine and bombings, journalists had written in the last few months about the "dawn of a new Somalia", describing instead Mogadishu's crowded beaches, late-night ice cream parlours and traffic-choked streets.
Many Somalis, Western and Arab diplomats and aid workers were rooting for the Horn of Africa country that had been in a perpetual state of violence and anarchy for 20 years. Had Somalia's turning point arrived?
Before the presidential vote the word was of change - from the corruption-tainted leadership of President Sheikh Sharif Ahmed, from the cycle of violence and from Somalia's reputation as a failed state.
Somalis got change when lawmakers overwhelmingly voted for Mohamud, a political newcomer known as an academic with a background in reconciling feuding clans, unblemished by a previous record in ineffectual governments.
After the 18-hour vote in a cramped hall, men in suits and women in colourful sequined scarves and dresses rose spontaneously to mark Mohamud's election by singing their national anthem: "Somalia, Wake Up". Celebratory gunfire echoed across the country.
But two days later, a more ominous kind of gunfire shattered the euphoria.
Journalists filed into the newly-built Jazeera Palace, a symbol of Mogadishu's construction boom. The road leading to the hotel in the city's safest zone, a couple of kilometres from U.N. and African Union bases, was not blocked.
Security measures began once people crossed the hotel's courtyard. The body pat-downs, equipment checks and bag searches were efficient if somewhat cursory. Reporters entered a fifth-floor room with views of Mogadishu's low-rise blocks and the sparkling Indian Ocean beyond.
To fill the inevitable delay, the media jostled to meet the new president's staff, hoping to secure a coveted one-on-one interview. Somali security officials milled around.
Eventually, more than three hours after the event was scheduled to start, Mohamud and Ongeri entered the room, flanked by their diplomatic and security entourages.
Barely a minute into Ongeri's opening remarks, the first explosion struck. Gunfire erupted and journalists crouched.
Looking out the windows, bodies lay on the ground, a bloodied, disfigured leg lay in the middle of the street.
Mohamud and Ongeri were determined to finish what they had come to say. Both carried on their speeches, promising such attacks would not deter them from pushing for peace in Somalia.
A calm voice, picked up by a recorder placed where Mohamud was speaking, could be heard saying amid the clamour after the first blast: "We are in very good hands, we don't worry."
Then the second explosion hit. Mohamud winced. Outside, a severed head lay in a crater about 100 metres away.
The timing of the attack showed the militants had reliable intelligence, perhaps someone on the inside. This will be a problem for Somalia's new leadership.
A foreign ministry official, Mohamed Maie, said security staff and African Union soldiers had let their guard down.
While al Shabaab is steadily losing ground, it can still regroup and easily infiltrate government-controlled areas. More worryingly, there are still disenchanted, radicalised Somalis ready to strap on explosive belts.
Among Mohamud's biggest challenges will be to capitalise on the security gains made over the last year and reform a disparate and badly paid security force so that it pledges its allegiance to the country, rather than rival power-brokers.
Back at the African Union's base, a Ugandan soldier sighed, pointing to the blood splattered across the armoured vehicle that had driven journalists to the hotel.
"Look at what they did to my car," he said.