Ugandans and LGBT supporters rallied against an anti-gay bill at the Uganda High Commission in London on Jan. 8, 2014. Gail Orenstein/NurPhoto/Sipa USA/AP

President Barack Obama warned Uganda on Sunday that its plans to further criminalize homosexuality, would further "complicate our valued relationship."

Obama said new legislation that President Yoweri Museveni has pledged to sign will mark a "step backward" for all Ugandans and reflect poorly on the country's commitment to protect the human rights of its people.

Homosexuality is already illegal in Uganda under a colonial-era law that criminalizes sex acts "against the order of nature."

Museveni said last week that he plans to sign the bill, which prescribes life imprisonment for acts of "aggravated homosexuality."

Those acts are defined as sex acts where one of the partners is infected with HIV, sex with minors or the disabled and repeated sexual offenses among consenting adults.

The United States is Uganda's largest donor, sending more than $400 million in aid annually in recent years. If Museveni signs the bill, the U.S. could find ways to register disappointment over the law.

Obama said the United States stands for the protection of fundamental freedoms and universal human rights and believes people everywhere should be treated equally.

"That is why I am so deeply disappointed that Uganda will shortly enact legislation that would criminalize homosexuality," Obama said in a written statement issued from Southern California, where he was spending the weekend after a tour of drought-stricken parts of the state.

"Enacting this legislation will complicate our valued relationship with Uganda," he said, adding that the U.S. has conveyed that message to Museveni.

It was unclear when Museveni will sign the bill although he is under pressure to do so. Ugandan lawmakers passed it in December. The measure enjoys broad support among Christian clerics and lawmakers who say it is needed to deter Western homosexuals from "recruiting" Ugandan children.

Susan Rice, the U.S. national security adviser, said Sunday on Twitter that she spoke "at length" with Museveni on Saturday night and urged him not to sign the bill.

Ugandan gay activists have accused some of their country's political and religious leaders of being influenced by American evangelicals who want to spread their anti-gay campaign in Africa.

A prominent Ugandan gay group singled out Scott Lively, a Massachusetts evangelical, and sued him in March 2012 under the Alien Tort Statute, which allows non-citizens to file suit in the U.S. if there is an alleged violation of international law.

Uganda is one of many sub-Saharan African countries where homosexuals face severe discrimination, if not jail terms. Nigeria last month increased penalties against gays there and a recent attack by police against young men grabbed headlines this week.

Anyone found guilty of homosexuality is subject to the death penalty in Mauritania and Sudan, something that has also been considered in draft versions of Uganda’s infamous Anti-Homosexuality Bill, which is still under debate.

A June report by Amnesty International noted that it is not uncommon in several African countries for lesbians to be “deliberately targeted for sexual violence.”

“Some deem this practice ‘curative’ or ‘corrective’ rape, laboring under the belief that if the victim has sex with a man, she will be ‘cured’ of being a lesbian,” the report said.

Al Jazeera and The Associated Press. Tom Kutsch contributed reporting.