Ugandan President Yoweri Museveni on Monday signed a harsh anti-gay bill into law.

The measure, approved by lawmakers on December 20, was first introduced in 2009 and drew international condemnation for including the death penalty. The bill as passed replaces capital punishment with life imprisonment for people repeatedly convicted of having consensual sex with a member of the same sex. The sentence can also be imposed in cases where one of the partners is HIV-positive, a minor or disabled. The bill also seeks to outlaw the promotion of homosexuality, effectively silencing opponents of the measure.

Museveni at first said that he disagreed with the bill, claiming that “sick” gay people need help. Last weekend, at a parliamentary retreat, he announced that a report prepared by Ugandan scientists had convinced him that being gay was a choice and that he would sign the legislation, a move criticized by U.S. President Barack Obama as “complicating” the U.S.'s relationship with the African nation. He later challenged U.S. scientists to prove being gay is not a choice.

At the bill's signing ceremony, Museveni charged that the West was attempting to impose its values on Uganda.

“We have been disappointed for a long time by the conduct of the West, the way you conduct yourselves there,” he told reporters on Monday. “Our disappointment is now exacerbated because we are sorry to see that you live the way you live, but we keep quiet about it. Now you say, 'You must also live like us' – that's where we say no.”