Editor's note: Harry Belafonte is a Grammy Award-winning musician, civil rights activist and a trustee for amfAR, The Foundation for AIDS Research. Mathilde Krim, Ph.D., is the founding chairman of amfAR.
(CNN) -- It is a tragic irony that two countries in Africa -- Nigeria and Uganda -- that for many years experienced the subjugation of colonial rule have recently enshrined into law discriminatory practices that dehumanize their own citizens.
In Uganda, a draconian bill recently signed by President Yoweri Museveni makes it a crime to be gay. Any person convicted of "the offense of homosexuality" faces life imprisonment. Anyone found guilty of "funding or sponsoring homosexuality or other related activities" will be sentenced to a seven-year jail term.
Apart from being a flagrant abuse of human rights, the new law will severely impede the efforts of any organization conducting HIV prevention and outreach programs serving gay men in Uganda.
Gay men, other men who have sex with men, and transgender individuals are disproportionately affected by HIV/AIDS -- in Uganda and the world over. Driving a community that is already stigmatized further into the shadows will seriously undermine progress on the global epidemic, progress that depends on reaching the most vulnerable populations.
Opprobrium from the U.S. and other nations is greeted by Uganda's leaders with a familiar refrain: Stop trying to impose your values on us. But the United States is as entitled as any nation to espouse a set of values, and if those values enshrine the right of all people to be treated with dignity and respect, then we should make every effort to export them.
The struggle against HIV/AIDS, now in its fourth decade, has always also been a human rights issue.
In the early days of AIDS in the United States, when confusion, ignorance and hysteria reigned, there were those who called for people with HIV to be quarantined or tattooed. Until recently, HIV-positive people were barred from entering the United States. Fighting for its life in the early 1980s, the gay community rose up and the struggle for gay rights became the civil rights struggle of the tail end of the 20th century.
It is far from over, but with the repeal of "don't ask, don't tell," which sanctioned anti-gay discrimination in the military, and victories on same-sex marriage in 17 U.S. states and the District of Columbia, we have made substantial progress. U.S. Attorney General Eric Holder has called gay rights one of "the defining civil rights challenges of our time."
Responding to the passage of the anti-homosexuality law in Uganda, President Barack Obama said it would "complicate" the United States' relationship with Uganda.
Instead, the passage of this blatantly discriminatory piece of legislation should fundamentally alter our relationship with Uganda, a country that receives close to $500 million annually from the U.S. in foreign assistance, largely for HIV/AIDS programs.
To make its position abundantly clear, the U.S. should redirect its assistance for HIV/AIDS and other health and development concerns toward nongovernmental and civil society organizations working in Uganda. Indeed, if protecting the human rights of gay people is in fact a priority of U.S. foreign policy, then we should re-examine our relationship with all countries receiving foreign aid and restructure our relations with those that criminalize homosexuality.
As Archbishop Desmond Tutu rightly declared in condemning the Ugandan anti-homosexuality law: "There is no scientific justification for prejudice and discrimination, ever. And nor is there any moral justification."
What does exist, however, is the very real possibility that this cancerous bigotry will spread to other countries wishing to scapegoat an easily targeted minority.
If they have an ounce of humanity, the governments of Uganda and Nigeria will repeal these odious laws without delay.
Follow us on Twitter @CNNOpinion
Join us on Facebook/CNNOpinion
The opinions expressed in this commentary are solely those of Harry Belafonte and Mathilde Krim.