Image copyright Reuters Image caption At the London Pride parade, an act that could be punishable with jail in Uganda under the proposed law

President Barack Obama has warned Uganda's President Yoweri Museveni that enacting an anti-gay law would complicate relations with the US.

Under the proposed legislation, those convicted of homosexual acts could face life imprisonment.

The law would also make it a crime not to report gay people.

Mr Museveni last month refused to sign the bill but on Friday indicated that he would approve it shortly, after receiving scientific advice.

Government spokesman Ofwono Opondo said a team of Ugandan scientists asked by the president for a report on homosexuality had told Mr Museveni that "there is no definitive gene responsible for homosexuality".

He told the AFP news agency this meant "homosexuality is not a disease but merely an abnormal behaviour which may be learned through experiences in life".

Mr Opondo said the president was under strong domestic pressure to sign the bill.

Aid link

The private member's bill originally proposed the death penalty for some offences, such as if a minor was involved or the perpetrator was HIV-positive, but that clause has been dropped.

Media playback is unsupported on your device Media caption In December a gay rights campaigner spoke of her fears about the legislation

Uganda already has legislation banning gay sex between men, but the proposed law sharply tightens restrictions - and covers lesbians for the first time.

Promotion of homosexuality - even talking about it without condemning it - would also be punishable by a prison sentence.

The US is one of Uganda's largest foreign aid donors, and in 2011 a small number of American troops were sent to help the Ugandan military fight the rebel Lord's Resistance Army.

But President Obama, who once referred to the proposed law as "odious", says this relationship would become more complicated if it is approved, describing it as an affront, and a danger to, Uganda's gay community.

America's National Security Adviser, Susan Rice, said on Twitter that she spoke at length with the Ugandan President Museveni on Saturday night to urge him not to sign the bill.

President Obama's statement didn't limit criticism to Uganda, noting an increase in reports of violence and harassment of homosexuals from Russia to Nigeria.

Earlier refusal

A month ago, President Museveni refused to approve the controversial bill after it had been passed by parliament.

At the time, his spokesman said that the president believed that gay people are sick but that he did not believe they should be killed, or jailed for life.

"What the president has being saying is that we shall not persecute these homosexuals and lesbians. That is the point," said Tamale Mirudi.

Mr Museveni has been trying to reach a compromise with MPs, because if he refuses to sign the bill, parliament can still force it through with a two-thirds vote.

In a letter written to the parliamentary speaker when he blocked the bill in January, he disputed the view that homosexuality was an "alternative sexual orientation," reasoning that "You cannot call an abnormality an alternative orientation. It could be that the Western societies, on account of random breeding, have generated many abnormal people."