Ugandan President Yoweri Museveni has said he will sign into law a bill that prescribes life imprisonment for people convicted of some homosexual acts.
Museveni made the decision at a conference of his governing National Resistance Movement, government spokesman Ofwono Opondo said.
Opondo said the president based his decision on a report by "medical experts", saying that "homosexuality is not genetic but a social behaviour".
Museveni had said two weeks ago that he would only sign the bill after seeking the opinion of scientists.
The anti-homosexuality bill, which has drawn condemnation from Western countries and human rights groups, was passed by parliament in December.
Museveni said in January that the bill had been rushed after it got approved without the required number of MPs. He said at the time that he would study the bill carefully before signing it.
In Twitter posts on Friday, Opondo said the legislators, who are holding a retreat chaired by Museveni, "welcomed the development as a measure to protect Ugandans from social deviants."
Evelyn Anite, a spokeswoman for the ruling party, said the report, which had been requested by the president, was prepared by more than a dozen scientists from Uganda's health ministry, the Associated Press news agency reported.
Opondo and Anite said the president did not say when he would sign the legislation into law.
A ministerial committee examining the issue put out a statement on Friday saying there was no gene for homosexuality and that it is "not a disease but merely an abnormal behaviour which may be learned through experiences in life".
Reuters news agency reported that, at the conference, Presidential Advisor on Science Dr Richard Tushemereirwe told Museveni that "homosexuality has serious public health consequences and should therefore not be tolerated".
Museveni has described homosexuals as "abnormal" people who need help to change their sexual orientation.
Homosexuality is already illegal in Uganda under a colonial-era law that criminalises sex acts "against the order of nature."
The new bill was first tabled in 2009, with a proposed death penalty for some homosexual acts, drawing a firestorm of criticism from rights groups and Western leaders
The death penalty was later removed amid international pressure, but rights groups want the whole bill scrapped.
Homophobia runs deep in Uganda, and religious leaders and some Ugandans on social media have been urging the president to sign the bill, saying laws punishing same-sex sex acts will save the country's moral fibre.
Museveni's decision was announced only days after gay Ugandans held a protest in Kampala denouncing the bill. Many carried placards saying "Help us stop anti-gay bill in Uganda."