Kenyan President Uhuru Kenyatta said Wednesday that gunmen who stormed an upmarket hotel complex, killing 14 people, had been "eliminated" after an almost 20-hour siege in which hundreds of civilians were rescued.
The attack was claimed by the Al-Qaeda-linked Somali group Al-Shabaab, which has repeatedly targeted Kenya since it sent its army into Somalia in October 2011 to fight the jihadist group.
At least one suicide bomber blew himself up and gunmen engaged security forces in numerous shootouts during the assault on the DusitD2 compound, which includes a 101-room hotel, spa, restaurant and office buildings.
The sight of armed Islamists and terrified civilians fleeing reminded Kenyans of a 2013 Shabaab attack on the Westgate mall left 67 dead in a siege that stretched out over four days and led to sharp criticism of the security response.
In a televised address, Kenyatta said some 700 civilians had been evacuated throughout the attack at DusitD2, with the swift and effective work from security forces drawing widespread praise in local media.
"I can confirm that... the security operation at Dusit complex is over and all the terrorists eliminated," Kenyatta said in a televised address to the nation.
"As of this moment, we have confirmation that 14 innocent lives were lost to the... terrorists, with others injured."
Police sources and a mortuary official had previously reported 15 dead.
It was not immediately clear how many attackers there were in total.
CCTV footage broadcast on local media showed four black-clad, heavily armed men entering the complex on Tuesday afternoon.
At least one of them blew himself up at the start of the attack.
A police source said two attackers had been shot dead Wednesday morning after a prolonged shootout.
"The two have red bandanas tied around their forehead and bullets strapped around their chest with several magazines each," the senior police officer said.
"Each had an AK47 which has been secured."
Briton, American among dead
The attack began at about 3pm (1200 GMT) on Tuesday, with a loud blast followed by gunfire and rapid calls for help spreading on Twitter.
Kenyan police chief Joseph Boinnet said the attack began with an explosion targeting three cars in the parking lot and a suicide bombing in the foyer of the Dusit hotel.
Among the dead was an American citizen, a State Department official said.
A mortuary official said there were also 11 Kenyan victims, a British victim, one with no papers as well as an unidentified torso of a male adult.
It was a tormented night for families of those trapped as they waited outside the hotel, with sporadic gunfire ringing out, and the rescue of dozens of people at about 3:30am (0030 GMT).
Explosions and gunfire intensified from dawn until police managed to secure the complex mid-morning.
'Very confident' attackers
As the first explosion and gunfire rang out in the leafy Westlands suburb, hundreds of terrified office workers barricaded themselves in the complex while others fled.
Distraught family members arrived at a nearby mortuary on Wednesday, where they said they had not been permitted to view the bodies.
"My sister is not in any of the hospitals and the last time we spoke she was a bit calm but suddenly she started crying and shouting and I could hear gunshots and her phone remained on but she wasn't speaking," said a woman who gave her name as Njoki.
"We have no doubt her body is here. Let them allow us in", she said, weeping.
A number of heavily-armed foreign forces, who appeared to be from embassies based in Nairobi, were at the scene alongside Kenyan security officers.
One survivor rescued from the building told a local television station the attackers were "very confident; they were people who knew what they were doing".
"Al-Shabaab has selected a target that is highly symbolic of Kenya’s economic success and its latest attack is aimed at undermining foreign investment and the recovery of the country’s tourism sector," said Robert Besseling of EXX Intelligence, a risk consultancy on Africa.
'A flash and a bang'
John Maingi said there had been "a flash of lights and a loud bang" at the Secret Garden restaurant where he works.
"When I peeped outside I saw a human leg which has been cut off. We hid in the room and then some police officers rescued us," he said.
Reuben Kimani, a barista who was rescued after several hours trapped inside the hotel, said he recognised one of the attackers as a client.
"I knew one of them because he had a big scar on one of his hands," he said. "I saw them. They shot six of my friends, four didn't die but two succumbed."
An editorial in the Daily Nation newspaper said the attack was a stark reminder that Kenya's security challenges were far from over.
The last major attack in the country took place in 2015, when Shabaab killed 148 people at the university in Garissa, eastern Kenya.
Since then sporadic attacks have targeted security forces mostly in the remote northeastern parts of the country.
"Just when we thought that things were calm, the gangs unleashed mayhem. For Kenyans the chilling reality is that the attacks are not ceasing," read the editorial.