Rights groups are urging Uganda's president to veto a new measure that they say hurts the fight against HIV and AIDS in the country.

Human Rights Watch described Uganda's HIV law as "deeply flawed" in part because it is based on what the group called "stigma and discrimination."

The bill, passed by lawmakers on Tuesday, criminalizes intentional transmission as well as attempted transmission of HIV. It also includes mandatory HIV testing for and their partners.

Ugandan lawmakers say the measure is necessary to stem the growing rate of HIV in this East African country, despite concerns that it could be used to violate the rights of people living with HIV.

About 1.5 million Ugandans live with HIV in a country of 36 million people.