Nairobi, Kenya (CNN) Men armed with guns and explosives burst into a hotel complex in Nairobi, killing at least 21 people in an attack that lasted hours and ended Wednesday morning.
An American and a Briton were among the people killed when armed militants targeted the DusitD2 compound Tuesday, an upmarket cluster of shops and hotel facilities in the Kenyan capital.
"The security operation at Dusit complex is over, and all the terrorists eliminated," President Uhuru Kenyatta told reporters without giving details. He called the attackers terrorists.
More than 700 people were safely evacuated during the attack, he said.
Surveillance footage shows the moment one of the attackers self-detonated a suicide vest in the foyer of the hotel, leaving behind billowing smoke as people fled. Before the explosion, another man walked by, stared at the attacker and kept walking.
Shortly before Kenyatta declared the attack over, gunshots and explosions could still be heard at the scene.
Authorities recovered six more bodies from the scene late Wednesday, according to Inspector General of Police Joseph Boinett. That brought the death toll to 21.
Sixteen Kenyans, one Briton, one American and three unidentified people of African origin are among the dead, he said. Twenty-eight others have been hospitalized.
Jason Spindler, an American who survived the attacks on the World Trade Center on September 11, 2001, was among those killed in the attack. He was co-founder and managing director of I-DEV International, a firm advising on business strategy for emerging markets.
A British man is also among the dead, the UK high commissioner to Kenya said. Development organization Gatsby Africa identified him as Luke Potter, head of its forestry and tea portfolio.
The coordinated attack started Tuesday afternoon as an unknown number of gunmen attacked the complex, leading to a standoff that continued through the night, with people trapped in various parts of the buildings hours later.
Security camera footage showed at least three armed men, dressed in dark clothing and with their faces uncovered, moving through the compound.
In a Twitter update, the Kenya Red Cross said at least 30 people were injured in the attack and 50 remained unaccounted for Wednesday.
Alice Mwanza, 26, who works within the complex in a building adjacent to the hotel, was one of those trapped for several hours as the assault unfolded.
"Yesterday around 3 p.m., we heard an explosion and immediately we could see smoke through the office window," she said.
She asked her friends to join her so they can go and see what has happening.
"We thought it was fire from one of the buildings. However, as we took the stairs to the ground floor I saw a human leg flying and my workmates saw it, too, and now we could hear gun shots," she said.
The group took shelter inside a soundproof studio and were rescued more than three hours later by police and Red Cross workers.
"After we were discharged, I was given some pills to calm down and later at home I had this scary flashback of that human leg flying. I had to sleep with my lights on," Mwanza said.
David Mureithi recounted how he and others were told by office security staff to flee through a back door after hearing an explosion followed by gunshots. "We could hear the gunshots getting closer and rapid," he said.
Two of his colleagues who had gone to get lunch shortly beforehand were killed, he said.
"I thank God I came out alive. I watched the news and it's still terrifying. "
Friends and relatives of those still unaccounted for anxiously waited for word on their loved ones as the interior ministry announced that authorities the site had been secured.
The President praised Kenya's security services for their swift response. "The operational priority of the security services was first and foremost to safeguard civilian life," he said.
Abbas Gullet, secretary general of the Kenya Red Cross, also hailed the rescue effort. "To have gotten out over 700 people out of that place, one would have to go in to understand and imagine what it took to get there," he said.
The Red Cross in Nairobi launched a blood drive to help the victims and urged people to donate. It also said it had launched a hot line to provide counseling and connect people who were searching for loved ones.
Somali Islamist militant group Al-Shabaab claimed responsibility for the attack and said it was a response to US President Donald Trump's 2017 decision to recognize Jerusalem as the capital of Israel, according to a statement circulated Wednesday.
"In a response to the witless remarks of US President, Donald Trump, and his declaration" of Jerusalem as the capital of Israel, the group targeted "Western and Zionist interests worldwide ... in support of our Muslim families in Palestine."
The attack happened three years to the day after Al-Shabaab militants targeted a Kenyan military base in neighboring Somalia, killing dozens of soldiers.
In 2013, Al-Shabaab militants targeted the luxury shopping center of Westgate, killing 67 people in a siege that lasted several days. Westgate is about 2 miles away from the site of Tuesday's attack.
Militants from the group also killed nearly 150 people, most of them students, in an attack on Garissa University College in Kenya in April 2015.
The latest attack began at a bank inside the compound Tuesday afternoon. An explosion ripped through three vehicles in the parking lot, followed by a suicide blast in the foyer of the Dusit Hotel, said Boinnet, the nation's police chief.
Crowds in bloodied clothes fled as armed officers escorted office workers to safety amid the gunfire. The flames in the parking lot raged, with the smoke visible from buildings far away in Nairobi's affluent Westlands neighborhood.
"As we were leaving, there were gunshots all over the place," said Evans Ng'ong'a, who was also inside the complex. "Attackers jumped over the fence and started shooting after the explosion."