The president of Gambia has signed a bill into law that calls for life imprisonment for some homosexual acts, the latest African country to codify harsh penalties for the gay community.

A copy of the legislation, which was obtained by The Associated Press on Friday, indicates that President Yahya Jammeh signed it on Oct. 9, though no government officials have yet publicly notified the country of the new law. Jammeh, one of Africa's most vocal anti-gay leaders, instructed gays and lesbians in 2008 to leave the country or risk decapitation.

Lawmakers approved the legislation in August, prompting an outcry from organizations including Amnesty International and Human Rights Watch. The law contains language identical to an anti-gay bill signed into law in Uganda earlier this year but later overturned by a court on procedural grounds.

It criminalizes "aggravated homosexuality," which targets "serial offenders" and people living with HIV or AIDS. Suspects can also be charged with aggravated homosexuality for engaging in homosexual acts with someone who is under 18, disabled or who has been drugged. The term also applies when the suspect is the parent or guardian of the other person or is "in authority over" him or her.

People found guilty of aggravated homosexuality can be sentenced to life in prison.

Amnesty International recently reported that Gambian security forces are torturing people arrested in raids, threatening them with rape and pressuring them to confess to homosexual acts.

The recent arrests are the first under the new law, Amnesty said Thursday. The group said at least four men, a 17-year-old boy and nine women have reportedly been arrested in recent weeks on suspicion of committing homosexual acts. An earlier statement described how the suspects were detained at the headquarters of the National Intelligence Agency in Banjul.

"They were subjected to torture and ill-treatment to force them to confess their so-called 'crimes' and to reveal information about other individuals perceived to be gay or lesbian," Amnesty said.

Amnesty accused the security forces of resorting to beatings and the threat of rape and other abuses if they did not confess.