Ugandan President Yoweri Museveni signed a bill into law that imposes harsh penalties for homosexual acts. (Reuters)

In a statement released early this afternoon the White House condemned Ugandan President Museveni's decision to sign into law a bill that criminalizes homosexuality, calling the legislation a step backward for civil rights.

"Instead of standing on the side of freedom, justice and equal rights for its people, today, regrettably, Ugandan President Museveni took Uganda a step backward," said White House press secretary Jay Carney in a statement. "As President Obama has said, this law is more than an affront and a danger to the gay community in Uganda, it reflects poorly on the country's commitment to protecting the human rights of its people and will undermine public health, including efforts to fight HIV/AIDS."

Officials in Uganda said the anti-gay bill, which includes sentences anywhere from 14 years to life in prison for anyone convicted of homosexuality or same-sex intercourse, was necessary to combat homosexuality being promoted in Africa by the West.

The bill, which was first introduced in 2009, originally called for the death penalty for some homosexual acts, but that provision was stripped after international outrage.

According to the Associated Press, the bill is widely popular in Uganda and, following its signing into law, schoolchildren celebrated in the capital and at least one held up a sign reading: "Obama leave us alone: Homosexuals have no room in Uganda."

In the statement, Carney said the White House will continue pressuring Ugandan officials to repeal the law but did not say whether the United States is considering suspending assistance or other financial sanctions against Uganda.

"We will continue to urge the Ugandan government to repeal this abhorrent law and to advocate for the protection of the universal human rights of LGBT persons in Uganda and around the world." he said.

While Homosexuality is already illegal in Uganda, the new legislation threatens to usher in a new era of harsh justice for offenders and human rights activists have said it could lead to widespread oppression against gays and lesbians.

The law makes it a crime to not report anyone practicing a homosexual lifestyle – which is expected to force gays and lesbians into underground, secret lives to avoid prosecution.

“This deeply offensive piece of legislation is an affront to the human rights of all Ugandans and should never have got this far,” Michelle Kagari, Africa deputy director at Amnesty International, said in a statement. She described the law as “draconian and damaging.”