WASHINGTON - The United States said on Friday it banned from visiting the country a Tanzanian official who announced a crackdown on homosexuality in Dar es Salaam in 2018.

The U.S. State Department said it was taking the action against Paul Makonda, administrative chief of the Tanzania capital, "due to his involvement in gross violations of human rights, which include the flagrant denial of the right to life, liberty, or the security of persons."

It said Makonda had "also been implicated in oppression of the political opposition, crack-downs on freedom of expression and association, and the targeting of marginalized individuals."

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

The move bars Makonda and his immediate family members from visiting the United States.

The State Department declined say what specific action by Makonda brought about the designation, but expressed "deep concern about deteriorating respect for human rights and rule of law in Tanzania."

Today we designated Dar es Salaam Regional Commissioner Paul Christian Makonda as ineligible to enter the U.S. for his involvement in gross violations of #humanrights. We are deeply concerned over deteriorating respect for human rights and rule of law in #Tanzania. — Secretary Pompeo (@SecPompeo) January 31, 2020

Makonda announced in 2018 that a special committee would seek to identify and punish homosexuals, prostitutes and online fraudsters in the city.

The U.S. embassy in Tanzania responded at the time by warning U.S. citizens in Tanzania to be cautious and to review their social media profiles and Internet footprints.

Tanzanian President John Magufuli cracked down on homosexuality after 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.

Under Magufuli, Tanzania has also tightened control of the media and civil society, shutting some newspapers, arresting opposition leaders and restricting political rallies.

Magufuli's government denies restricting media freedom and cracking down on democracy and human rights.

Follow NBC Out on Twitter, Facebook & Instagram