The United States has warned its citizens in Tanzania to be cautious after commercial capital Dar es Salaam announced a crackdown on homosexuality, which is a criminal offense in the East African country.
In an alert on its website late on Saturday, the U.S. Embassy in Tanzania advised Americans to review their 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 U.S. citizen who was detained or arrested should ensure the Tanzanian authorities informed the embassy.
Dar es Salaam's administrative chief Paul Makonda said on Wednesday that a special committee would seek to identify and punish homosexuals, prostitutes and online fraudsters in the city from this week.
Last October, at least 12 men were arrested at a Dar es Salaam hotel in a raid on a gathering which authorities said was to promote same-sex relationships.
President John Magufuli has 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 often reluctant to speak publicly in defense of gay rights.
In neighboring Kenya a conviction can lead to a 14-year jail sentence, although in recent years campaigners for lesbian, bisexual, gay and transgender (LGBT) rights have become increasingly vocal.
Uganda abolished the death penalty for homosexuality in 2013 but some offenses are still punishable by life in prison.
In 2016, Tanzania banned non-governmental organizations from distributing free lubricants to gays as part of efforts to control the spread of HIV/AIDS, even though some health experts warn that shutting down such outreach programs could put the wider population at higher risk of infection.
Source: Voice of America