Officials say eight Tanzanian police officers have been ambushed and killed while returning from patrol outside the commercial hub of Dar es Salaam.

The attack happened on Thursday night in an area called Jaribu.

Ernest Mangu, police chief, said on Friday that the identities of the assailants are unknown.

Times like these require the nation to be together. We mourn our men in uniforms and send condolences to families. #BungaMassacres — Zitto Kabwe Ruyagwa (@zittokabwe) April 13, 2017

The assailants first fired at the driver of the patrol vehicle before killing seven other officers and seizing their weapons.

An investigation has been launched into the killings, he said, adding that the motive was not immediately apparent.

President John Magufuli said in a message to the police chief that "I can't even describe how bad this is."

Mwigulu Nchemba, home affairs minister, says he has increased the number of police to hunt down assailants who have killed dozens of police and civilians in recent months.