Gunmen have launched an attack in the capital of Burkina Faso, Ouagadougou, with the French Embassy and a military headquarters the apparent targets.

Reports say Burkina Faso’s government said four attackers had been killed at the embassy and three at the headquarters.

Witnesses reported seeing armed men getting out of a car and opening fire before heading towards the embassy.

A French diplomatic source quoted by Agence France-Presse said the situation at the embassy was now under control.

A Burkinabe government statement said that there were still no details on any civilian casualties.

Pictures from the scene showed a cloud of black smoke rising into the sky.

It is unclear who is behind the violence.

The national police have issued a statement saying special forces are in action. Ouagadougou Mayor Armand Beouinde told France’s Le Monde newspaper that the attackers shot at the town hall and his office windows were shattered.

“Apparently, it is a jihadist attack,” he said, but gave no further details.

French President Emmanuel Macron was being kept up-to-date, said the Elysée Palace in Paris.

He has urged French nationals in the country to follow the embassy’s advice and stay away from troubled areas.

French forces based in the country have also been deployed.

The US embassy in the city has advised people to seek shelter.

Ouagadougou has suffered two major attacks by Islamist militants in the past two years.

The West African country also saw a failed coup in 2015.

The trial for dozens of the alleged perpetrators began earlier this week but was suspended after defence lawyers walked out in protest against the military court.