One day after Nigerian President Goodluck Jonathan signed legislation criminalizing homosexuality, police reportedly began rounding up gay men in Africa‘s most populous country.

On Monday, Jonathan signed the bill, which was passed by the national assembly in May, and contains harsh penalties for homosexual activity and membership in gay rights groups. “Persons who enter into a same-sex marriage contract or civil union commit an offence and are each liable on conviction to a term of 14 years in prison,” the law says. “Any person who registers, operates or participates in gay clubs, societies and organizations or directly or indirectly makes public show of same-sex amorous relationship in Nigeria commits an offence and shall each be liable on conviction to a term of 10 years in prison.”

The law is popular among Nigerians, a country where sodomy is already illegal. Under the country’s criminal code, elements of which date back to British colonial times, homosexual conduct falls under “Offenses Against Morality” and a person who “has carnal knowledge of any person against the order of nature” can be imprisoned. “This is a law that is in line with the people’s cultural and religious inclination,” Jonathan’s spokesman Reuben Abati told the AP. “Nigerians are pleased with it.”

Under the new law, same-sex “amorous relationships” are banned, as is membership in gay rights groups, prohibitions that have sparked both fear and defiance among Nigeria’s gay activists. The government “have just legalized violence, stigma and discrimination,” a gay man in Lagos, who asked not to be identified for his safety, told AFP. “Our situation has gone from bad to worse.” The man said that he particularly feared for LGBT people in majority-Muslim northern Nigeria, a region that is administered partly under Islamic law.

In Bauchi State, in northern Nigeria, police have reportedly arrested dozens of gay men in the past few weeks. The AP reports that police targeted gay men, tortured them into naming others, and are hunting more gay men down. Chairman Mustapha Baba Ilela of Bauchi state Shariah Commission, which oversees Islamic law in the state, told the AP that 11 men had been arrested and denies that torture was involved. Ilela said that members of the community helped “fish out” suspected gay men and the roundups will continue. “We are on the hunt for others,” he said.

Criticism of the law from outside Nigeria was swift. U.S. Secretary of State John Kerry said that the United States was deeply concerned by the measure. “Beyond even prohibiting same sex marriage, this law dangerously restricts freedom of assembly … and expression for all Nigerians,” he said in a statement. U.N. human rights commissioner Navi Pillay blasted the law for “making an already bad situation worse” by potentially causing an increase in violence. “Rarely have I seen a piece of legislation that in so few paragraphs directly violates so many basic, universal human rights,” Pillay said.

Perhaps the most powerful rebuke against the law came from UNAIDS. In addition to “further criminalizing LGBT people, organizations and activities as well as people who support them,” the organization said the law could prevent access to vital HIV services for LBGT people. “The health, development and human rights implications of the new law are potentially far-reaching,” UNAIDS and the Global Fund said in a statement.

According to UNAIDS, Nigeria has the second largest HIV epidemic in the world. An estimated 3.4 million Nigerians–4 percent of the general population–are living with HIV, and the organization argues that the law could undermine Jonathan’s own presidential initiative to fight the disease. “The provisions of the law could lead to increased homophobia, discrimination, denial of HIV services and violence based on real or perceived sexual orientation and gender identity,” UNAIDS said. “It could also be used against organizations working to provide HIV prevention and treatment services to LGBT people.”

Many countries in Sub-Saharan Africa outlaw homosexual acts. Efforts by Western nations to cut aid to countries like Uganda and Malawi have helped to bridle anti-gay legislation in those countries. But Nigeria, Africa’s largest producer of oil with an output of 2.5 million barrels per day, is mostly impervious to that kind of economic pressure. As Africa’s most populous country, developments in Nigeria echo across the continent, and there appears little other countries can do except condemn the new legislation.