Uganda's President Yoweri Museveni wants to reinstate a divisive anti-gay law that was rejected by a court, but without tough penalties for consenting adults, a ruling party legislator has said.

"We agreed to come up with a new version that doesn't hurt our Western friends but also protects Ugandans," Medard Bitekyerezo said on Tuesday.

"(The president) said he wants the law back in the house but now says if two consenting adults go into their room and decide to be stupid, let them be," he said.

(The president) said he wants the law back in the house but now says if two consenting adults go into their room and decide to be stupid, let them be. Medard Bitekyerezo, Ugandan politician,

"What he said he doesn't want, and which we must even increase the penalties (for), is recruitment of children and exploiting financially vulnerable youths."

Both the ruling National Resistance Movement party and the opposition vowed to re-introduce the law after the constitutional court ruled it had been passed without the presence of the required number of politicians in the parliament.

Bitekyerezo said the meeting on Monday had appointed a committee headed by the country's Vice President Kiwanuka Ssekandi to come up with a new version of the law, without saying when it might be introduced into the parliament.

Foreign aid redirected

The original version of the law, which passed in February but was overturned in August on a technicality, outlawed homosexuality and made it punishable with long prison terms.

The law had been criticised by the international community including the US, the World Bank and some European countries which delayed or redirected funds meant to aid the government.

The law was popular domestically, but was branded draconian and "abominable" by rights groups and was overturned on a technicality by the constitutional court on August 1.

Homosexuality remains taboo in many socially conservative African societies where some religious groups have branded it a corrupting Western import.

Critics have accused Museveni of drumming up homophobia to boost his support ahead of a presidential election scheduled for 2016, which will be his thirtieth year in power.