Smoke rises from the site of an armed attack in downtown Ouagadougou, Burkina Faso March 2, 2018. (Photo: REUTERS/Anne Mimault)

Four gunmen were neutralized outside the French embassy in the capital of Burkina Faso. The gunmen had attacked the army's headquarters as well as the downtown area and France's embassy, and the French ambassador said an explosion in the city was a terrorist attack.

A government statement has confirmed that there are no civilian causalities. Burkina Faso Special Forces are currently carrying out an operation at the spot.

It was not clear who was behind the violence but Burkina Faso and other West African countries have been targeted by jihadist groups linked to al Qaeda and Islamic State in the past few years.

It has been reported that witnesses saw gunmen alighting from a car and opening fire before heading towards the embassy.

"Attack underway at the French Embassy and French Institute. Stay hidden where you are," the embassy said in a statement posted on its Facebook site.

A French official in Paris confirmed that an assault against the embassy was under way, as well as against the Burkina Faso army headquarters.

EXPLOSION ROCKS ARMY HEADQUARTERS

An explosion rocked the army headquarters and then gunfire rang out in the vicinity. A witness said masked gunmen with backpacks had attacked the army headquarters shortly before the explosion.

Islamist militants have gained a stronger foothold in Africa's vast Sahel region in the last few years, launching attacks in Mali, Burkina Faso, Ivory Coast and Niger.

Men escape from Burkina Faso's army headquarters during an attack in the capital Ougadougou, Burkina Faso March 2, 2018. (Photo: REUTERS/Anne Mimault)

Suspected jihadists killed at least 18 people last August during a raid on a restaurant in Ouagadougou, and militants have targeted Burkinabe security forces along its remote northern border region with Mali.

Al Qaeda in the Islamic Maghreb (AQIM) claimed responsibility for an attack on a restaurant and hotel in Ouagadougou in January 2016 in which 30 people were killed.

OPERATION TO TACKLE ISLAMIST MILITANTS

Five countries launched a new task force last year to tackle Islamist militants in the region, to which international donors have committed half a billion dollars.

Jean-Marc Châtaigner, France's ambassador to West Africa's Sahel region, tweeted: "Terrorist attack this morning in Ouagadougou, Burkina Faso: solidarity with colleagues and Burkinabe friends." He urged people to avoid the city centre.

After the first big blast, the sound of a series of smaller explosions and exchanges of gunfire came from the direction of the headquarters. It ceased by around noon.