• Tanzanian security forces remove the slain body of an attacker who was wielding an assault rifle, outside the French embassy in the Salenda area of Dar es Salaam,

Tanzanian security forces remove the slain body of an attacker who was wielding an assault rifle, outside the French embassy in the Salenda area of Dar es Salaam, (Photo : REUTERS/Emmanuel Herman)

A gunman killed three police officers and a private security guard on a rampage through a diplomatic quarter of Tanzania's main city Dar es Salaam on Wednesday, before being shot dead while holed up in a guardhouse at the French embassy's gate.

Videos on the internet, apparently filmed by onlookers from buildings across the street from the French embassy, showed the gunman inside the guardhouse. He exchanged fire at very close range with police and men who appeared to be embassy guards.

Like Us on Facebook

Police said the attacker had first shot two police officers with a pistol at an intersection in the district, which houses a number of diplomatic missions. He took rifles from the fallen police officers, and headed on foot to the French embassy a few hundred metres away, firing randomly and occupying the guard house.

President Samia Suluhu Hassan said on Twitter that the attacker had been "neutralised" and "calm has returned".

"I send my condolences to the police service and the families of three policemen, and one officer of the SGA security company, who lost their lives after an armed person attacked them in the Salenda area of Dar es Salaam," Hassan said.

Six people were injured in addition to the four who were killed, police commissioner of operations and training Liberatus Sabas said in a Tweet shared by the account of the Tanzanian Police Force.

Inspector-General of Police Simon Sirro said in an interview aired on local television that police were trying to identify the attacker. While the motive was not yet known, Sirro suggested the attack could be related to Tanzania's role in neighbouring Mozambique, where it sent troops this month to help fight Islamist insurgents as part of a regional security force.

"There are problems, our soldiers are there," Sirro said of Mozambique.

Police official Sabas told reporters it was too early to say whether the gunman was a Tanzanian national, or whether he had links to terrorism.

Tanzanian television aired footage showing police officers in bullet-proof vests who appeared to be wrapping a dead body outside the embassy in white material to remove it from the scene.

SGA Security, which describes itself as a major security services provider in East Africa, did not immediately respond to requests for comment. The French embassy in Dar es Salaam could not immediately be reached for comment and French foreign ministry officials in Paris were not available.