The United States warned its citizens in Tanzania to be cautious after commercial capital Dar es Salaam announced a crackdown on homosexuality, a criminal offence in the country.
In an alert on its website, the US Embassy in Tanzania advised Americans to review social media profiles and internet footprints.
“Remove or protect images and language that may run afoul of Tanzanian laws regarding homosexual practices and explicit sexual activity,” it said.
The alert said any US citizen detained or arrested should ensure Tanzanian authorities informed the embassy.
Dar es Salaam’s administrative chief Paul Makonda said a special committee would seek to identify and punish homosexuals, prostitutes and online fraudsters in the city from this week.
The foreign ministry said Makonda was voicing his own opinion and the planned crackdown did not have national government support.
“The government of the United Republic of Tanzania would like to clarify those are his own views and not the government position,” the ministry said in a statement.
Last October, at least 12 men were arrested at a Dar es Salaam hotel in a raid on a gathering which authorities said promoted same-sex relationships.
President John Magufuli cracked down on homosexuality since winning power in 2015 and a conviction for having “carnal knowledge of any person against the order of nature” could lead to a sentence of up to 30 years in jail.
Homosexuality remains taboo across much of Africa and gay people face discrimination or persecution, with rights groups reluctant to speak publicly in defence of gay rights.
In 2016, Tanzania banned non-governmental organisations from distributing free lubricants to gays as part of efforts to control the spread of HIV/AIDS, even though some health experts warn shutting down outreach programmes could put the wider population at higher risk of infection.