(CNN) -- Ugandan President Yoweri Museveni is expected to sign a bill Monday that criminalizes homosexuality, a government spokeswoman told CNN.
The signing is expected to take place at 3 a.m. ET.
Museveni has gone back and forth about the controversial bill.
Last month, Museveni said he wouldn't sign the bill, describing homosexuals as "sick" people who needed help, not imprisonment.
Then he backtracked this month and said he'd sign it because scientists had determined that there's no gene for homosexuality and it was merely abnormal behavior.
Then, last week, he said he would seek advice from American scientists before he made any decision.
Homosexual acts are illegal in Uganda. The proposed legislation passed by parliament toughens the penalties, including life imprisonment for certain acts.
Museveni said that Ugandan scientists had determined there was no gene for homosexuality.
"It was learned and could be unlearned," he said.
Shortly after his announcement, U.S. President Barack Obama warned that enacting the bill would affect relations between the two nations. He described the proposal as an "affront and a danger to the gay community" in Uganda.
The United States and Britain are among the nation's largest donors.
Placating Western donors
Then, in what appeared to be a move to placate Western donors, Museveni said he would seek extended guidance.
In a statement last week, he said U.S. scientists sent him opinions indicating "homosexuality could be congenital."
"I therefore encourage the U.S. government to help us by working with our scientists to study whether, indeed, there are people who are born homosexual," Museveni said. "When that is proved, we can review this legislation."
Years of debates
A Ugandan lawmaker first introduced the bill in 2009 with a death penalty clause for some homosexual acts. It was briefly shelved when Britain and other European nations threatened to withdraw aid to Uganda, which relies on millions of dollars from the international community.
The nation's parliament passed the bill in December, replacing the death penalty provision with a proposal of life in prison for "aggravated homosexuality." This includes acts where one person is infected with HIV, "serial offenders" and sex with minors,Amnesty International said.
The bill also proposed years in prison for anyone who counsels or reaches out to gays and lesbians, a provision that would ensnare rights groups and others providing services to lesbian, gay, bisexual and transgender people.
Homosexuality in Africa
Homosexuality is illegal in 38 African countries, where most sodomy laws were introduced during colonialism. In Uganda, homosexual acts are punishable by 14 years to life in prison.
But lawmakers in the conservative nation have sought tougher legislation, saying the influence of Western lifestyles risks destroying family units.
Rights groups worldwide have condemned the bill as draconian.
CNN's Antonia Mortensen in Entebbe, Uganda, and Yousuf Basil in Atlanta contributed to this report.