Nairobi, Kenya — Extremists launched a deadly attack on a luxury hotel in Kenya's capital Tuesday, sending people fleeing in panic as explosions and heavy gunfire reverberated through the complex. A police officer said at least 15 people had died.

"It is terrible. What I have seen is terrible," said Charles Njenga, a man who ran from the scene.

A Kenyan police officer said 15 bodies had been taken to the morgue. He spoke on condition of anonymity because he was not authorized to speak to reporters. The U.S. State Department confirmed an American citizen was among those killed, but did not release the victim's identity. Al-Shabab asserted that 47 people were killed but its Shahada news agency post gave no details.

Get Breaking News Delivered to Your Inbox

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. The DusitD2 hotel complex includes bars, restaurants, offices and banks and is in a well-to-do neighborhood with many American, European and Indian expatriates.

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

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.

It was not clear how many attackers took part in the attack, which was claimed by Al-Shabab, the Somalia-based Islamic extremist group that carried out the 2013 Westgate Mall attack in Nairobi that left 67 people dead.

"We are aware that armed criminals are holing up in the hotel, and special forces are now currently flushing them out," said Kenya's national police chief, Joseph Boinnet, describing the assault as a suspected terror attack.

Boinnet gave no figures on the dead and wounded. However, a Kenyan police officer who spoke on condition of anonymity because he was not authorized to talk to the media said that bodies were seen in restaurants downstairs and in offices upstairs, but "there was no time to count the dead."

Also, a witness who gave his name only as Ken said he saw five bodies at the entrance. He said that 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."

Cars are seen on fire at the scene where explosions and gunshots were heard at the Dusit hotel compound, in Nairobi, Kenya, Jan. 15, 2019. Reuters

The violence appeared to fit the pattern of attacks al-Shabab often carries out in Somalia's capital, with an explosion followed by a group of gunmen storming the place.

The attack immediately reminded many Kenyans of the Westgate Mall attack in Nairobi in 2013, when al-Shabab extremists burst into the luxury shopping center, hurling grenades and starting a deadly days-long siege. Like the Westgate Mall attack, this one appeared aimed at wealthy Kenyans and foreigners living in the country.

The attack Tuesday came three years to the day after al-Shabab extremists attacked a Kenyan military base in neighboring Somalia, killing scores of people. The al Qaeda-linked group objects to the presence of Kenyan troops in the turbulent Horn of Africa nation.

A Kenyan intelligence official, who spoke on condition of anonymity, said the country had been on high alert since November, with information about potential attacks on high-profile targets in Nairobi.

A Somali diplomat who spoke on condition of anonymity said Somali officials were in the hotel for meetings at the time of the attack and several were feared to still be inside.

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 Dusit hotel promoted its spa by tweeting: "Is your new year off to a rough start?"

The U.S. Embassy in Nairobi issued an alert and retweeted a warning from the State Department urging Americans to avoid the Westlands neighborhood where the Dusit Hotel complex is located.

"Security operations by Kenyan authorities in the Dusit Hotel and its vicinity are ongoing," a security alert said.

UPDATE: Security operations by Kenyan authorities in the Dusit Hotel and its vicinity are ongoing. Please continue to avoid the area and remain in known safe areas. https://t.co/nnV806APYt @BobGodec — U.S. Embassy Nairobi (@USEmbassyKenya) January 15, 2019

The U.S. military has maintained a steady beat of missile attacks against al-Shabab targets in Somalia, announcing the latest such airstrike just last week. The Pentagon said six militants were killed in the strike on a camp which "served as a staging area for terrorists in the region."