(CNN) -- Uganda's government institutions will lose U.S. funding as punishment for a law signed earlier this year by President Yoweri Museveni that makes some homosexual acts punishable by life in prison.

Greg Kabel

In addition, the White House said Thursday that Washington will cancel a planned military exercise with Uganda and deny entry to certain Ugandan citizens, including those "involved in serious human rights abuses, including against LGBT individuals."

The United States will not end its humanitarian support for Uganda or its cooperation to stamp out the Lord's Resistance Army, led by the elusive Joseph Kony.

"We will seek to advance these interests even as we continue -- in Uganda and around the world -- to oppose discriminatory practices and champion human rights for all," read the statement by White House National Security Council spokeswoman Caitlin Hayden.

Uganda's anti-homosexuality act, first introduced in 2009, originally included a death penalty clause for some such 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.

Museveni signed the bill into law in February, two months after Uganda's Parliament passed it after replacing a death penalty provision with a proposal of life in prison for "aggravated homosexuality." This includes acts in which one person is infected with HIV, "serial offenders" and sex with minors, according to Amnesty International.

The law calls for the imprisonment of those who counsel or reach out to gays and lesbians -- a provision that would ensnare rights groups and others providing services to lesbian, gay, bisexual and transgender people.

Museveni's position on the law changed several times before he signed it.

At one point, he said he wouldn't sign the bill, describing homosexuals as "sick" people who needed help, not imprisonment.

He said he changed his mind after scientists had determined that there is no gene for homosexuality and that it is merely a choice to embrace abnormal behavior.

Museveni told CNN in February that he believes sexual behavior is a matter of choice and gay people are "disgusting."

CNN's Faith Karimi and Nick Thompson contributed to this report