"Reconsider travel to Uganda due to crime, terrorism, and anti-LGBTQI+ legislation," the U.S. State Department said in a new advisory issued late Monday.
It said the Anti-Homosexuality Act "raises the risk that LGBTQI+ persons, and those perceived to be LGBTQI+, could be prosecuted and subjected to life imprisonment or death based on provisions in the law."
The travel advisory also warns "LGBTQI+ persons, or persons perceived to be LGBTQI+, could face harassment, imprisonment, blackmail, and violence," the State Department said, warning also of the risk of attacks by "vigilantes."
The law - considered one of the harshest of its kind in the world - contains provisions making "aggravated homosexuality" a capital offense - and penalties for consensual same-sex relations of up to life in prison.
"Be mindful that any public identification with the LGBTQI+ community, as either a member or supporter, could be grounds for prosecution, and that even private consensual same-sex relations are illegal."
Uganda's Information Minister Chris Baryomunsi told AFP the updated travel advisory "was expected and we are not surprised."
"However, (the) U.S. should understand that Uganda is a sovereign state which legislates for its people, not for the Western world," he added.
"They can issue travel advisories as it is within their rights but should be reminded blackmail has no place in (the) modern world."
In May, U.S. President Joe Biden called for the immediate repeal of the measures he slammed as "a tragic violation of universal human rights," and threatened to cut aid and investment in the East African country.
But earlier this month Museveni defied international calls to rescind the law, saying "no one will move us."
The legislation has broad support in the conservative majority Christian country, where lawmakers have defended the measures as a necessary bulwark against Western immorality.