Ugandan President Yoweri Museveni yesterday signed a law that will see repeat homosexuals jailed for life.
He also dismissed warnings of a backlash from key allies and donors, including the US.
Museveni said he could not understand how one could "fail to be attracted to all these beautiful women and be attracted to a man" instead.
"There is something really wrong with you," the 69-year-old said of gay men. "Homosexuals are actually mercenaries.
"They are heterosexual people but because of money they say they are homosexuals. These are prostitutes because of money."
The law also outlaws the promotion of homosexuality and requires people to denounce gays.
The signing of the law came despite criticism from US President Barack Obama, who warned that ties between Kampala and Washington would be damaged.
The bill will provide a test for foreign donors, with Museveni warning Western nations not to meddle in the country's affairs.
He also said he was not afraid of aid being cut.
"Outsiders cannot dictate to us, this is our country," he said. "I advise friends from the West not to make this an issue, because if they make it an issue the more they will lose."
Denmark said yesterday it would redirect 47 million kroner (HK$67 million) in humanitarian aid to Uganda from government organisations to private sector initiatives and aid agencies.
Passing the bill is likely to be popular in Uganda, where Museveni - in power for 28 years - faces re-election in 2016.
The controversial bill went through parliament in December after its architects agreed to drop a death penalty clause.