Updated

An American citizen was one of at least 15 people killed Tuesday when militants from the Somalia-based extremist group al-Shabab attacked an upscale hotel in Kenya's capital city, a State Department official told The Associated Press.

The official said the department was offering condolences to the American's family and friends but declined to identify the individual publicly. Nic Hailey, the British high commissioner in Kenya, said at least one British national had been killed.

Al-Shabab -- which carried out the 2013 attack at the nearby Westgate Mall in Nairobi that left 67 people dead -- claimed responsibility for the carnage at the DusitD2 hotel complex, which includes bars, restaurants, offices and banks and is in a well-to-do neighborhood with many American, European and Indian expatriates.

"We regret to confirm that at approximately 3 p.m. today [Tuesday], a group of armed assailants attacked the Dusit Complex in a suspected terror attack. Security and emergency teams immediately responded to the incident and have cordoned off the area. The situation is being managed and residents are being screened and evacuated from the area," police said in a statement.

Al-Shabab claimed responsibility on Monday for the attack at an upscale hotel complex in Kenya's capital Nairobi.

A Kenyan police officer, speaking on condition of anonymity, told the AP that 15 bodies had been taken to a nearby morgue. Al-Shabab asserted that 47 people were killed but its Shahada news agency post gave no details. In addition to the victims, Kenya's President Uhuru Kenyatta said Wednesday that security forces killed the Islamic extremist gunmen involved in Tuesday's attack.

"All the terrorists have been eliminated," he said in a televised address, before urging Kenyans to "go back to work without fear."

Kenyatta did not say how many attackers were involved but added that more than 700 people were evacuated during the security operation.

Witnesses described thunderous explosions and seeing militants gunning down people at cafe tables. One bystander, who gave his name only as Ken, said he saw five bodies at the hotel entrance. Other people were shouting for help and "when we rushed back to try to rescue them, gunshots started coming from upstairs, and we had to duck because they were targeting us and we could see two guys shooting," he said.

"We were changing our shifts, and that is when I heard a loud blast and people were screaming," said Enoch Kibet, who works as a cleaner at the cafe and managed to crawl out a basement gate. "I couldn't believe I was alive. The blast was so loud and shook the whole complex."

Authorities sent special forces into the hotel to flush out the gunmen. Late Tuesday night, about eight hours after the siege began, Interior Minister Fred Matiang'i said all of the buildings affected had been secured and that security forces were mopping up.

"I would like to reiterate that the situation is under control and the country is safe," he said.

NEW AL QAEDA CELL FORMS IN BURKINA FASO, AS TERROR GROUP CEMENTS FOOTHOLD IN AFRICA

Al-Shabab's reign of terror has blighted the country for years, killing hundreds of people. Tuesday's incident comes on the third anniversary of the battle of El Adde, when al-Shabab extremists launched an assault at a Kenyan military base in Somalia, killing scores of people.  (AP Photo/Ben Curtis)

However, more gunfire was heard about an hour later, Kenyan broadcaster NTV reported. Some family members said they had been in touch with loved ones still hiding inside the complex, waiting to be rescued.

Early Wednesday, Kenya's interior ministry said a tweet that all buildings had been secured and there was no further threat to the public.

Police told the AP they have detained a man and two women following a raid at a home where one of the attackers was said to live.

They are being questioned “to establish how they knew the man who lived here and the people who had been visiting," a police official said.

He said authorities descended on the home after neighbors called to say they had identified a vehicle that was parked outside the hotel during the attack.

US AIRSTRIKE WIPED OUT AL-SHABAB CAMP, INTEL OFFICIALS SAY

Though the number of attackers remains unclear, Kenya's Citizen TV aired security-camera footage that showed at least four heavily armed men in dark-colored, paramilitary-style gear.

Al-Shabab said its fighters were still inside the complex in Nairobi's Westlands neighborhood.

The coordinated assault began with an explosion that targeted three vehicles outside a bank, and a suicide bombing in the hotel lobby that severely wounded a number of guests, said Kenya's national police chief, Joseph Boinnet.

'WHITE WIDOW' TERRORIST KILLED BY RUSSIAN SNIPER, REPORTS SAY

Kenyan hospitals appealed for blood donations even as the number of wounded remained unclear.

Dozens were rushed to safety as plainclothes officers went from shop to shop in the complex. Some people held up their hands to show they were unarmed.

As officers searched luxury fashion displays, wounded people were carried away on stretchers.

Security forces are seen at the scene of a blast in Nairobi. (AP Photo/Ben Curtis)

Like the attack at the Westgate Mall, this one appeared aimed at wealthy Kenyans and foreigners. It came a day after a magistrate ruled that three men must stand trial in connection with the Westgate Mall siege.

Al-Shabab has vowed retribution against Kenya for sending troops to Somalia to fight it since 2011. Tuesday's violence came three years to the day after al-Shabab extremists attacked a Kenyan military base in Somalia, killing scores of people.

CLICK HERE FOR THE FOX NEWS APP

The Al Qaeda-linked group has killed hundreds of people in Kenya. In the deadliest attack, al-Shabab claimed responsibility for an assault on Kenya's Garissa University in 2015 that killed 147 people, mostly students.

The latest carnage demonstrated al-Shabab's continued ability to carry out spectacular acts of bloodshed despite a dramatic increase in U.S. airstrikes against it under President Donald Trump.

Tourism -- an important source of revenue in Kenya, East Africa's largest economy -- has suffered because of the violence. A Kenyan intelligence official said the country had been on high alert since November, with information about potential attacks on high-profile targets in Nairobi. The official was not authorized to talk to the media and spoke on condition of anonymity.

Despite the repeated attacks, the Kenya-Somalia border remains porous, with al-Shabab extremists able to easily bribe their way across, according to a U.N. panel of experts.

The hotel complex in Nairobi's Westlands neighborhood is about a mile from Westgate Mall on a relatively quiet, tree-lined road in what is considered one of the most secure parts of the city. The hotel's website says it is "cocooned away from the hustle and bustle in a secure and peaceful haven."

On Monday, the hotel promoted its spa by tweeting: "Is your new year off to a rough start?"

The Associated Press contributed to this report.