Tanzania says that a plan to hunt down and arrest suspected homosexuals in the country's economic capital was not official policy, distancing itself from a citywide crackdown slammed by rights groups.
Dar es Salaam's powerful regional commander Paul Makonda, urged citizens last Monday to begin reporting homosexuals for round-ups in a country where anti-gay rhetoric has soared in recent years.
"The government of the United Republic of Tanzania would like to clarify that these are (Makonda's) personal views and not the position of the government," the foreign affairs ministry said in a statement released Sunday evening.
It added that the government would "continue to respect all international human rights conventions which it subscribes to".
A fervent Christian and loyal ally of President John Magufuli, Makonda had said homosexual behaviour "tramples on the moral values of Tanzanians and our two Christian and Muslim religions".
His remarks drew strong criticism including from Amnesty International and the United Nations.
Under British colonial-era laws, homosexuality is illegal in Tanzania and same-sex acts between men are punishable by a maximum life sentence.
Anti-gay sentiment has increased since Magufuli's 2015 election, forcing most gays, lesbians and other sexual minorities to live in secrecy.
Last year, the president said that everybody should condemn homosexuality, "even cows" and soon after his government threatened to arrest or deport gay rights activists.
Three South Africans were subsequently expelled for allegedly advocating for same-sex marriage.
AIDS clinics have also been shut down under Magufuli, accused of "promoting" homosexuality, while he has encouraged women to abandon birth control and have more babies.
On Saturday, the European Union said it had recalled its chief representative to Brussels for discussions, following reports he had been asked to leave by the government.