Local and international groups fighting AIDS warned on Tuesday that a new Nigerian law criminalizing same-sex marriage and gay organizations will jeopardize the fight against the deadly disease.

Human rights activists reported that dozens of gay men were being arrested in northern Nigeria in an apparent response to the law. The United States, Britain and Canada condemned the law, with Secretary of State John Kerry saying Monday that it "dangerously restricts freedom" of expression and association of all Nigerians.

President Goodluck Jonathan's spokesman confirmed Monday that he had signed the Same Sex Marriage Prohibition Act on Jan. 7, providing penalties of up to 14 years in jail for a gay marriage and up to 10 years' imprisonment for membership or encouragement of gay club, societies and organizations. The U.N. agency to fight AIDS and the Global Fund to Fight AIDS, Tuberculosis and Malaria expressed "deep concern that access to HIV services for lesbian, gay, bisexual and transgender people will be severely affected by a new law in Nigeria — further criminalizing LGBT people, organizations and activities, as well as people who support them."

The law also criminalizes people and groups who support "the registration, operation and sustenance of gay clubs, societies and organizations, processions or meetings in Nigeria." Those convicted could be jailed for 10 years.