Ugandan President Yoweri Mu

UNITED NATIONS (AP) — Secretary-General Ban Ki-moon is demanding the revision or repeal of Uganda's law imposing life sentences for homosexuality and same-sex marriage.

The U.N. chief warned Tuesday that the law could fuel prejudice and encourage harassment against gays, U.N. spokesman Martin Nesirky said.

Ban urged the Ugandan government to protect all people from violence and discrimination and offered U.N. support "for constructive dialogue," he said.

Uganda's new-anti-gay law punishes gay sex with up to life in jail. The bill originally proposed the death penalty for "aggravated homosexuality." First-time offenders now face life in jail, instead the original 14-year jail term.

Homosexuality has long been criminalized in Uganda under a colonial-era law.

Some Ugandan lawyers and activists have said they will challenge the law in court as unconstitutional and impossible to implement.