US President Barack Obama has warned Ugandan leader Yoweri Museveni against enacting anti-gay legislation, calling it a "step backward" that would complicate ties with Kampala.
Obama said he was "deeply disappointed" by Museveni's apparent plans to move forward with the bill.
"We believe people everywhere should be treated equally, with dignity and respect, and that they should have the opportunity to reach their fullest potential, no matter who they are or whom they love," Obama said.
"That is why I am so deeply disappointed Uganda will shortly enact legislation that would criminalise homosexuality.
"[It] will be more than an affront and a danger to the gay community in Uganda. It will be a step backward for all Ugandans and reflect poorly on Uganda's commitment to protecting the human rights of its people."
The anti-gay legislation cruised through parliament in December after its architects dropped an extremely controversial death-penalty clause.
The measure, which has been greeted with international condemnation, would criminalise the promotion or recognition of homosexual relations.
Obama suggested that Museveni, a key regional ally for both the US and the European Union, risks damaging his country's ties with Washington.
Obama's National Security Adviser, Susan Rice, wrote in a series of tweets that enacting the law "will put many at risk and stain Uganda's reputation".
Rice added that she had urged Museveni to not sign the bill.
Museveni, a devout evangelical Christian, has said gays are "sick" and "abnormal".
Nevertheless, he refused to sign the anti-gay legislation last month. "He does not approve of homosexuality but he believes these people have a right to exist," presidential spokesman Tamale Mirudi said at the time.