The cool new rooftop pizza joint was buzzing with the hip kids snapping selfies and watching the sun set over Mogadishu when the deep crunch of an explosion made everyone jump.
A thick and acrid plume of smoke drifted up from behind one of the nearby high buildings and the crowd started to realise it was another bomb blast in their city.
We heard a sporadic crack of gunfire and then the sound of sirens – as ambulances headed to the scene through the city’s congested streets.
The huge suicide car bomb had been just the start of the attack.
Al-Shabab fighters had used it to breach the front entrance of the Ambassador Hotel and had rushed in, opening fire.
It’s a fortified residence used by high-profile Somalis and members of parliament – two British-Somali MPs were killed along with around a dozen other people. Many others were injured.
It came as a real shock to Maryan Hassan, a British-born lawyer who we were interviewing on the roof terrace when the car bomb went off and the gunfire started.
It’s just the second big explosion she’s experienced since moving to Mogadishu permanently in January.
“It’s the same story as everyone else – I came to make a difference,” she said, talking about the high number of Somalis, like her, returning from the diaspora from places such as Britain, Canada and America.
“My parents were married in London and my brothers and I were all born and raised in the UK, but I grew up constantly knowing I was Somali,” she said.
“My parents were definitely at the core of why I’m so passionate about Somalia.”
With two degrees in law, and a specialism in arbitration, Maryan has already has become the prime minister’s legal adviser, but the al-Shabab attack nearby while we talked was a clear reminder of the risks.
“I don’t think anyone comes back to Mogadishu and says it’s going to be an easy ride,” she said.
“You’re obviously having to come back to a society that you were not raised in, so socially there’s a lot more obstacles to overcome as opposed to security.”
‘Making Somalia safer’
The security forces had been preparing for an attack.
As UK Foreign Secretary Philip Hammond arrived the fighting at the hotel was still going on.
The Somali president and prime minister came to meet him at the heavily-fortified airport rather than at their office in the city.
But politics is more promising than security.
This year’s elections are far from fully democratic, but will be a big step towards rebuilding a new, federal state after 25 years of civil war – as long as they happen.
Britain spends £200m ($289m) a year in Somalia on development and security. The foreign secretary explained why.
“We’re committed, we’ve been here for a long time, we have seen some very solid progress,” Mr Hammond said.
“What’s happening here now is making Somalia safer, but it’s also making Britain safer.
“It’s addressing our security concerns, it’s addressing our migration concerns and having a stable and secure Somalia is good for Britain as well as Somalia.”
‘We are ready’
We spent time with the Somali police force and their African Union mentors just as they set up a roadblock and searched cars for explosives.
“The essence of stop-and-search is for us to prevent anything untoward,” said Supt Eze Therophiles, a Nigerian police commander.
“In the recent past there have been incidents of vehicle-borne improvised explosive device attacks – that is the trend now,” he said, referring to car bombs like the one which would go off on those same streets a few hours later.
It was just down the hill from parliament. The local commander told us there had been previous assassination attempts on MPs and so they had to protect the building every time it was in session.
“There is not so much risk these days, although the enemy al-Shabab have attacked us several times and we have pushed them back,” said Lt Jimale Ahmed Ali from the Somali National Police.
“We are very much ready and well armed… we have enough guns here, so we are not afraid.”
On high alert
It’s optimism and confidence that things are going to get better, but while Somalia has come a long way in the last few years it’s still a very dangerous place.
Al-Shabab may have been driven out of Mogadishu and most of the urban areas across Somalia, but they still hold sway in much of the countryside and have switched to insurgent-style attacks.
With elections due in a few months, and Ramadan approaching – a time when al-Shabaab traditionally ramps up its car bombs and suicide attacks – the city is on high alert.
But still the militants get through.
The attack on the Ambassador Hotel killed at least 15 people and injured dozens more.
Investigators are still establishing how many gunmen there were, and why after the attack appeared to be over the fighting erupted again and continued until morning.
And there’s an even bigger challenge facing security services across the country.
The African Union’s Assistance Mission in Somalia (Amisom) is under pressure.
Its 22,000 troops from Djibouti, Ethiopia, Kenya and Uganda are struggling to switch from the conventional warfare of driving al-Shabab out of towns and villages to coping with countering a violent insurgency.
The Somali army and police are a crucial part of bringing security to fill the vacuum after the militants left, as al-Shabab often brought basic, if brutal, justice, law and order.
But it’s hard to establish trusted national institutions after 25 years of war and in a society still so driven by clan rivalries that the limited elections are still being run along clan lines.
There will not be “one person – one vote” this year, but the 275 MPs will be elected by fewer than 14,000 people – caucuses picked by elders and divided up favouring the four biggest clans.
Full representation is the target for the 2020 elections, and while not ideal, the formation of a federal state – with power devolved to the newly emerging states – is a slow and complicated process.
“Somalia is emerging from one of the most violent civil wars… and it’s still facing a potent insurgency from al-Shabab,” said Michael Keating, the UN’s Special Representative in Somalia.
“What it’s trying to do is both contain that insurgency and put in place a state – difficult enough after a civil war, but particularly difficult as Somalia is a clan-based society.
“If your baseline is 10 or 20 years ago they have made extraordinary progress. The fact there is a president, four regional states – perhaps a fifth one formed this year – is a tremendous achievement.”
Most of those involved in the process expect the elections, scheduled for August, to be postponed by a couple of months – but they are hopeful.
Somaliland in the north-west has already declared its independence, although it is not internationally recognised; Puntland in the north-east has a well established state structure; and other emerging regional power centres are forming.
The whole federal nation-building project, driven by political rivalries, is on the line if elections fail to take Somalia on the next step towards stability and democracy.