U.S. President Barack Obama has condemned what he called the "appalling" terrorist attack at a hotel in the capital of Mali that left 25 people dead, and he vowed “relentless” pursuit of the killers.

Speaking at a summit of regional leaders in the capital of Malaysia, Obama said the Friday assault in Bamako will only stiffen U.S. resolve to combat terrorism.

“Like the heinous attacks we saw in Paris and attacks we see all too often elsewhere, this is another awful reminder that the scourge of terrorism threatens so many of our nations,” said Obama in Kuala Lumpur while attending the annual meeting of the Association of Southeast Asian Nations (ASEAN).

He said the U.S., allies and partners are determined to protect their citizens, push back on the “hateful ideologies that fuel this terrorism,” and root out terrorist networks.

People cheer Malian soldiers in front of the Radisson hotel in Bamako, Mali, Nov. 20, 2015.

Two West African militant groups - al-Qaida in the Islamic Maghreb (AQIM) and its affiliate El Mourabitoune - claimed joint responsibility for the attack. A U.S. defense official called AQIM the "leading suspect" in the assault.

In addition to the 25 hostages who were killed, two gunmen also died when Malian special forces conducted a floor-to-floor assault to clear the hotel, according to Malian officials.

A reporter for VOA from Bamako says it is not clear if there was a third gunman in the attack. She says forensic investigators were at work inside the hotel Friday evening.

Mali's President Ibrahim Boubacar Keita, who cut short a visit to Chad to return to Bamako Friday, has declared a state of emergency and three days of mourning in the West African nation. In remarks broadcast on state television, Keita said the government will do everything it can "to eradicate terrorism in Mali."

Earlier reports said the gunmen had taken up to 170 hostages and that only 80 had been released. The discrepancy may be because some hotel guests escaped on their own and have not been accounted for.

Obama said the U.S. was still working to account for all citizens who may have been at the hotel.

WATCH: Scenes from outside Radisson Blu hotel in Bamako

Embed code

Copy and paste the embed code below. The code changes based on your selection.

Share this video

The Radisson is a popular hotel for foreigners and was reportedly hosting delegates to Malian peace talks. Witnesses say gunmen entered the hotel in a car with diplomatic license plates early Friday morning, then went room to room seeking victims.

"When it started I thought that it was firecrackers. But it went on and on," one hotel guest told VOA's French to Africa Service. "We heard the alarm from the hotel and I even went out of my room... but I noticed a lot of smoke in the hallway. I went back to my room and the Malian soldiers came, knocked on the door, took a small group of us out."

Malian special forces spent several hours going through the 190-room hotel, rescuing guests and tracking down the gunmen. Both of the deceased gunmen were killed by security forces.

U.N. peacekeepers stationed in Mali helped with the operation, while a number of French troops and two American military personnel assisted outside the hotel.

Malian troops take position outside the Radisson Blu hotel in Bamako on November 20, 2015. Gunmen attacked the luxury hotel in Mali's capital Bamako, seizing 170 guests and staff in an ongoing hostage situation that has left at least three people dead.

Condemnation from abroad

Besides the U.S., condemnation also came from U.N. Secretary General Ban Ki-moon and French President Francois Hollande.

Hollande is scheduled to meet with Obama in Washington in the coming days to discuss stepping up France’s contribution to the U.S.-led effort to counter Islamic State militants in Syria and Iraq.

White House Deputy Security Advisor Ben Rhodes said there is “a greater sense of urgency to do more” following the terror attacks in Paris earlier this month. U.S. security officials have said it appears Islamic State is behind the bloodshed there.

The attack in Mali underscores the threat posed by Islamist militants who remain active in northern and central Mali despite the presence of U.N. peacekeepers.

A French-led military force ousted Islamist groups from power in northern Mali in 2013. The groups had seized power in the north after a military coup in Bamako in 2012.

An attack in the capital in March on a restaurant popular with tourists killed five people.

William Gallo in Washington contributed to this report.

In this image made available by Malikahere.com security personnel, right, arrive close to the scene of an attack on a hotel in Bamako, Mali, Nov. 20, 2015.