Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Thirty-three hostages, including a government official, were freed in Burkina Faso Saturday, hours after Islamist militants stormed a hotel in the nation's capital, according to officials and witnesses.

Clement Sawadogo, Burkina Faso's minister of public service, labour and social security, were among those freed and taken to a hospital, Remis Dandjinou, the country's communications minister, said on Twitter at 4 a.m. local time.

A death toll in the attack on the Splendid Hotel in Ouagadougou was not immediately known. Al Qaeda in the Islamic Maghreb (AQIM) claimed responsibility for the attack, SITE Intelligence Group reported.

A witness, journalist Jean-Baptiste Dipama, said he saw as many as six attackers, split up in two groups of three and driving two 4x4 vehicles with license plates from Niger. One group attacked the hotel and the other targeted a nearby cappuccino restaurant, he said.

When security forces arrived there was a standoff and security forces were seen trading gunfire with militants, according to officials and witnesses.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

By 2 a.m. Saturday an assault on the hotel had begun, French ambassador Gilles Thibault said on Twitter.

The ultra-hardline AQIM group had called in December for Muslims in several countries, including Burkina Faso, to "wake up for Jihad,” said the director of SITE, Rita Katz.

"Hitting western hotels follows group's operational style," Katz said on Twitter, adding that the group attacked the Radisson Blu hotel in Mali’s capital of Bamako in November. Twenty people were killed.

Burkinabe and French soldiers stand near the Splendid Hotel in Ouagadougou, Burkina Faso on January 15, 2016, where suspected Islamist fighters are holding hostages. Reuters

Issa Dicko, a finance bureaucrat in the Burkino Faso government, said he was at a restaurant across the street from the hotel and watched the violence unfold.

Dicko told NBC News that he saw at least three attackers who were holding hostages inside of the crowded hotel, while bodies and burning cars littered the street outside.

At about 10:30 p.m. local time, Dicko said law enforcement officials had the hotel surrounded.

The U.S. Embassy in Ouagadougou imposed a curfew for the city overnight. The U.S. Defense Department said that all department personnel were accounted for.

Linda Thomas-Greenfield, the assistant secretary of state for African Affairs, said that the U.S. strongly condemns the attack.

“We extend our deepest condolences to families of victims of this senseless assault,” Greenfield wrote on Twitter.

Security officers take their positions outside Splendid Hotel in Ouagadougou, Burkina Faso in this still image taken from a video January 15, 2016, during a siege by Islamist gunmen. REUTERS TV / Reuters

As the violence and standoff was ongoing, the French Embassy recommended that locals stay home and avoid the area, and the French ambassador said an Air France flight due to land in Ouagadougou was diverted to Niger.

The attack would be the first in Burkina's capital by Islamists in a country that is diverse in religious terms and has a population that is around 60 percent Muslim, according to government figures.

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