The gunman, who was attempting to access the French embassy through a guardhouse, was gunned down in a guardhouse at that gate after going on a rampage through a diplomatic quarter of Dar es Salaam on Wednesday.
Onlookers from buildings adjacent to the French embassy captured videos on the internet that appeared to show the gunman inside the guardhouse. In very close quarters, he exchanged gunfire with police and embassy guards.
The attacker shot two police officers with a pistol at an intersection in the district, which is home to several diplomatic missions. Taking rifles from the fallen police officers, he walked to the French embassy a few hundred metres away, firing randomly and occupying the guardhouse.
“Calm has returned,” President Samia Suluhu Hassan said on Twitter after an attacker was neutralized.
“My condolences go to the police service and the families of the three policemen, and one officer of the SGA security company, who were killed by an armed attacker in the Salenda area of Dar es Salaam,” said Hassan.
In addition to the four who were killed, six people were injured, police commissioner of operations and training Liberatus Sabas said.
Simon Sirro, the Inspector-General of Police, said in an interview aired on local television that police are trying to identify the attacker. Sirro speculated that the attack might be connected to Tanzania’s role in neighboring Mozambique, where troops were sent this month to fight Islamist insurgents as part of a regional security force.
“Our soldiers are there, there are problems in Mozambique,” Sirro said.
It is too early to tell if the gunman is a Tanzanian national or if he is connected to terrorism, said police official Sabas.
A video shown on Tanzanian television showed police officers in bulletproof vests wrapping a dead body in white material to remove it from the scene.
A request for comment was not immediately returned by SGA Security, which describes itself as a major security services provider in East Africa. French embassy officials in Dar es Salaam and French foreign ministry officials in Paris were not immediately available for comment.