Uganda has dismissed US president Barack Obama's call to its leader Yoweri Museveni not to sign an anti-homosexuality law, saying the US was trying to blackmail the east African country.

On Sunday, two days after President Museveni said he would sign the law widely criticised abroad as harsh and unjust, Mr Obama warned that it would complicate US relations with Uganda and be a "step backward for all Ugandans."

A senior Obama administration official said Washington – a major aid donor sending more than €290m a year – would review US relations with Uganda, a key regional ally in the fight against Islamic extremism in Somalia.    

However, Ugandan Ethics and Integrity Minister Simon Lokodo said aid should not be tied to Uganda's stand on homosexuality.

"We don't like to blackmail others. It's very dishonest, very irresponsible and unfriendly of persons to attach behaviour of another community to their sharing resources" Mr Lokodo told Reuters TV in Kampala.

Homosexuality is taboo in many African countries. It is illegal in 37 nations on the continent and activists say that few Africans gays dare to be open about sexuality, fearing imprisonment, violence and loss of their jobs.

Mr Museveni has not yet said when he plans to sign the law.

The anti-gay bill was introduced in 2009 and initially proposed a death sentence for homosexual acts, but was amended to prescribe jail terms including life in jail for what it called aggravated homosexuality.

That category includes gay sex with a minor, where the victim is infected with HIV and where the victim is vulnerable such as a disabled person.

Mr Lokodo said that were he to meet Mr Obama, he would tell him that he had made the right choice in marrying a woman.

"I would tell him point-blank that he chose the right direction and this direction was to marry Michelle," he said.

"They have produced children, why does he encourage and promote others, men and women of same sex, to live together and have no offspring like him?"

Mr Obama, a Democrat who has lobbied to expand rights for gay Americans and supports same-sex marriage, and has urged African nations to end discrimination against homosexuals.

In a statement, UNAIDS, the United Nation's agency on HIV/AIDS, also warned that the law would make more gay people shun HIV testing and treatment when faced with prosecution or jail.

Tánaiste condemns legislation

Tánaiste Eamon Gilmore has also condemned the new legislation.

In a statement, he said that he is "deeply concerned by the news that Uganda intends to enact legislation to criminalise homosexuality."

Mr Gilmore added that he "made it clear, including in direct talks with President Museveni, that the enactment of this draconian legislation would affect our valued relationship with Uganda." 

Mr Gilmore also described the proposed bill as "a threat to Uganda's gay community and an affront to all those who value tolerance, respect and dignity of all people."