OUAGADOUGOU, Jan 16 (Reuters) - At least 20 people died and others were taken hostage when Islamist gunmen stormed a hotel in the capital city of Burkina Faso on Friday, a hospital director said, an attack for which al Qaeda in the Islamic Maghreb (AQIM) claimed responsibility.

Security forces began an assault to reclaim the Splendid Hotel in the early hours of Saturday and entered its lobby, part of which was on fire, a Reuters witness said. The hotel is frequented by Westerners, which may have made it a target for the militants.

About 30 hostages including the labor minister were freed from the hotel, said Minister of Communications Remis Dandjinou. No one has said publicly how many hostages might be in the hotel.

It was the first time militants have carried out an assault in the capital of Burkina Faso and comes as a setback to efforts by African governments, France and the United States to prevent attacks that have destabilized the region.

It follows a raid on a luxury hotel in Mali last November in which two attackers killed 20 people, including citizens of Russia, China and the United States. There have been many attacks by militants in other countries in West Africa in recent years and the vast majority of those killed have been Africans.

Robert Sangare, director of Ouagadougou’s university hospital center, said that among an initial batch of 15 people brought to hospital some had bullet wounds while others had injuries from falls.

Patients saw around 20 bodies, and one European woman being treated at the hospital said the attackers appeared to target Westerners, said Sangare, who had spoken to the patients.

The hotel is sometimes used by French troops with Operation Barkhane, a force based in Chad and set up to combat Islamist militants across West Africa’s vast, arid Sahel region.

A U.S. defense official said France, the former colonial power, had requested U.S. intelligence surveillance and reconnaissance support in the city, and at least one U.S. military member in Burkina Faso was giving “advice and assistance” to French forces at the hotel.

The government has not ruled out calling for help from French special forces stationed in the country, Burkina Faso Foreign Minister Alpha Barry told Reuters.

France normally has up to 200 special forces troops in the country.

STIFF TEST

The assault began around 8.30 p.m. local time, and the attackers torched cars and fired in the air to drive people back from the building. There was an intense gun battle followed by at least an hour of relative quiet, in part as security forces prepared their bid to recapture the hotel.

“We had just opened and there were a few customers we started to serve when we heard gunshots. ... There were three men shooting in the air,” said Vital Nounayon, a waiter at a restaurant across the street from the hotel.

“Lots of people left their cars and motorcycles and ran. (Attackers) set fire to the vehicles. They also fired on the Cappuccino Restaurant across from the hotel before setting it on fire,” he said, adding that the attackers wore turbans.

Medical personnel moved the wounded away from the front of the hotel and one civilian was shot dead as the assault began around midnight, a Reuters witness said.

Burkina Faso, a majority Muslim country, has undergone a democratic transition since October 2014 when longtime President Blaise Compaore was overthrown during mass protests.

Elite troops launched a one-week coup in September 2015, but the landlocked West African state has been largely spared violence by Islamist militants, unlike its neighbor Mali.

The attack presents a stiff test for President Roch Marc Kabore, who was elected in November as Burkina Faso’s first new leader in decades.

WARNING SIGNS

Three Islamist groups including AQIM and al Mourabitoun claimed responsibility for the Mali hotel attack, the most prominent by militants who are based in the north of the country and have staged a series of attacks over the last year.

Al Mourabitoun was also involved in the attack in Burkina Faso, according to the SITE intelligence group.

Earlier on Friday, the Ministry of Defence said about 20 armed men killed a gendarme and a civilian in an attack on the village of Tin Abao in northern Burkina Faso. It was unclear whether the attack had been waged by militants.

French Ambassador Gilles Thibault said he had been informed that a curfew would be in place from 11 p.m. local time (2300 GMT) Friday to 6 a.m. Saturday.

The embassy in December warned French citizens against traveling to a national park in eastern Burkina Faso after reports that Malian jihadists were threatening to kidnap.

Around 50 unidentified gunmen attacked a Burkina Faso gendarmerie brigade near the western border with Mali in October 2015, killing three in an attack the government at the time blamed on the leaders of a failed coup one month before.

Islamist militants have staged attacks in a number of West African states bordering the Sahel in recent years.

Boko Haram have killed thousands in northeastern Nigeria during a six-year insurgency and in 2015 extended its attacks into neighboring countries Chad, Niger and Cameroon. (Additional reporting by Makini Brice in Dakar, Joe Bavier in Abidjan and John Irish in Paris; Writing by Matthew Mpoke Bigg; Editing by Toni Reinhold, Leslie Adler and Kim Coghill)