Security forces from Burkina Faso and France are attempting to take control of a luxury hotel in the centre of country's capital Ouagadougou, which was stormed by Islamist gunmen, who took hostages and killed at least 20 people, according to eyewitnesses and officials at the scene.

Al Qaeda in the Islamic Maghreb (AQIM) has said it was responsible the attack, in tandem with another extremist group, SITE Intelligence Group reported.

Around thirty hostages, including a government minister, have been freed, the country's Communications Minister said.

At least 10 bodies were found inside a café next to the Splendid Hotel, the Internal Affairs Minister said. It is unclear how many people are still inside.

The director of the university hospital, who spoke to patients wounded in the attack at Hotel Splendide in downtown Ouagadougou late on Friday, said around 20 people have been killed. The hotel was also reportedly on fire.

"We have received around 15 wounded people. There are people with bullet wounds and people who are injured because of falls," said Robert Sangare, director of Ouagadougou's university hospital centre.

Two unidentified armed men approach a vehicle, near to a hotel, in Ouagadougou, Burkina Faso AP (AP Television)

Mr Sangare said one European woman being treated at the hospital told him the attackers appeared to target white people, according to Reuters.

The attempt to retake the hotel was reported on Twitter by Gilles Thibault, the French ambassador to Burkina Faso.

Local media reported that the commandos were made up of Burkinabe security forces with support from French special forces and US intelligence.

The country's foreign minister, Alpha Barry, earlier told Reuters that special forces had secured a perimeter around the hotel.

Reports over Twitter suggest a cafe-restaurant opposite the hotel, which is popular with westerners, has also been targeted.

The gunmen were said to have fired in the air as they stormed the four-storey hotel before security forces arrived.

An intense exchange of gunfire between the gunmen and Burkinabe forces followed, according to a Reuters witness.

A journalist at the scene said US troops were also conducting a rescue mission at the hotel, CNN reports. The US Embassy in Ouagadougou tweeted: "We are closely following the situation downtown".

Several cars were ablaze outside the hotel, an Associated Press reporter near the scene on Friday said.

A video, purportedly of the Hotel Splendide on fire, appears to show the flaming cars in the streets.

The French embassy in Burkina Faso have called the incident a "terrorist attack" and have urged people in the area to "go home".

The Ambassador repeated the assertion on Twitter and extended a curfew in the city from 11pm to 6am.

Mr Thibault also added that an Air France flight from Paris to Ouagadougou was diverted on Friday night to Niamey, Niger.

The hotel is sometimes used by French troops with Operation Barkhane, a force based in Chad and set up to combat Islamist militants across Africa's vast, arid Sahel region. It is also reportedly popular with other foreigners and UN employees.

A senior member of the group called in December for Muslims in several countries, including Burkina Faso, to wage jihad.

AQIM, along with two other groups, also claimed responsibility for an attack on the Radisson Blu hotel in Mali, which killed 20 people in November.

Two militants killed 20 people from nations including Russia, China and the United States at the luxury hotel in Mali's capital on 20 November, before being killed by the security forces.

Burkina Faso has endured bouts of political turmoil since 2014 when veteran President Blaise Compaore was overthrown in a popular protest.