An individual armed with two assault rifles shot dead three Tanzanian police officers and a security guard in Dar es Salaam on Wednesday, before himself being shot dead. The incident took place near the French embassy.
Updated at 16h23 UT:
The director general of the Tanzanian police force, Simon Sirro, told a local news website that his forces had lost two members, a toll since updated to three, and that the man who had killed them was dead.
The death of the security guard was announced later. Six other people were wounded in the exchange of fire.
The police are still attempting to establish the identity of the attacker.
In an unverified video posted on the internet a man is seen outside the gates of the French embassy and the sound of gunfire can be heard.
Tanzanian television showed images of police officers in bulletproof vests wrapping a body in a white sheet outside the embassy.
Condolences to victims' families, speculation on attacker's motive
Tanzanian President Samia Suluhu Hassan has sent her condolences to the families of the dead officers, expressing shock that such an event should take place.
No claim of responsibility has been made, nor is there any indication of the attacker's motive.
Chief of Police Operations, Liberatus Sabas, has called for residents of the Tanzanian capital to remain calm and allow the authorities to carry out a full investigation.
However, the Tanzanian police chief Sirro referred to "problems" in neighbouring Mozambique, where the Tanzanian army is involved in operations against jihadists who have seized part of Cabo Delgado province, where French oil company TotalEnergies has a a major natural gas project.