The United States has slapped sanctions on Uganda -- cancelling a military air exercise, imposing visa bans and freezing some aid -- amid deep US anger at "vile" Ugandan anti-gay laws.
The legislation "runs counter to universal human rights and complicates our bilateral relationship," the White House said, renewing calls for the law to be repealed.
In the steps unveiled on Thursday, specific Ugandan officials involved in "human rights abuses" -- including against the gay community -- will be barred entry to the United States, National Security Council spokeswoman Caitlin Hayden said.
The US gave some $487 million in aid to Uganda in 2013, of which $411 million went towards health programs.
Some of those funds will now be frozen or redirected, with money going towards non-governmental organizations rather than the health ministry.
Plans for a US military-sponsored aviation exercise in Uganda were also cancelled, but Hayden stressed none of the moves "diminishes our commitment to providing development and humanitarian support for the Ugandan people."
A $2.4 million program for a community-policing program will also be stopped as the US is "very concerned about the extent to which the Ugandan police may be involved in abusive actions" in implementing the law, the White House said.
And a planned National Health Institute will now be built in another African country with some $3 million in US aid.
Signed by President Yoweri Museveni in February, the law calls for "repeat homosexuals" to be jailed for life, outlaws the promotion of homosexuality and obliges Ugandans to denounce gays to the authorities.
Rights groups say it has triggered a sharp increase in arrests and assaults of the African nation's lesbian, gay, bisexual and transgender (LGBT) community.
"From Uganda to Russia to Iran, LGBT communities face discriminatory laws and practices that attack dignity, undermine safety and violate human rights," US Secretary of State John Kerry said at a Gay Pride event for his staff.
"And we each have a responsibility to push back against the global trend of rising violence and discrimination against LGBT persons," said Kerry, who has likened the Ugandan law to anti-Semitic legislation in Nazi Germany.
US ambassador to the United Nations, Samantha Power, called for similar anti-gay laws that exist in 76 countries around the world to be repealed.
While the United States was committed to supporting the health needs of the Ugandan people, "we seek to invest in partners and programs that share our commitment to equal access and our evidence-based approach to medicine and science," the White House said.
Nor would the US cut back on its bid to track down "the murderous Lord's Resistance Army."
Rights groups last month reported an increase in "arbitrary arrests, police abuse and extortion" among the gay and lesbian community, adding "scores have fled the country" and at least one person had been killed.
Some 17 people had been arrested on "allegations of consensual same-sex conduct with other adults or, in some cases, simply on the suspicion of appearing to be LGBT," Human Rights Watch (HRW) and Amnesty International said in a joint report.
Most have since been released without charge, some after paying bribes, the groups said. Others said they were sexually assaulted in custody.
With tabloid newspapers printing pictures of dozens of people alleged to be gay, at least 100 have fled the country.
House Democratic leader Nancy Pelosi said Thursday's announcement "sends a stern signal to the Ugandan government: the United States will not tolerate the vile persecution of LGBT Ugandans."
The legislation "represents breathtaking ignorance, injustice, and cruelty," Pelosi said in a statement.