The Ugandan parliament has ratified a bill that will see homosexuals imprisoned for life, if the person is caught in the act more than once, according to activists and reports on Friday.

One gay activist speaking to AFP following the vote said that now he is “officially illegal.”

This is the toughest measure to have been accepted in the country yet, although there was an even more severe version of the bill, which involved a controversial death penalty clause, something that was excluded from the final draft, said the politician behind the bill, David Bahati.

The document has now been sent to the office of President Yoweri Museveni for final approval.

Uganda has considered tough anti-gay laws before. The country saw its first official proposal in 2009, but it was stifled then following an international outcry, with US President Barack Obama calling the bill “odious.”

The reason for this is that the 2009 version proposed that repeat offenders get the death sentence, while also including an article that proposed the same for acts in which one partner was a minor, or if one were sick with HIV.

As well as much tougher penalties for homosexuality and a prohibition of any kind of public promotion of homosexuality, the new bill reportedly includes any public discussion of the matter by rights groups or NGOs.

The situation with LGBT rights in Africa is particularly difficult. According to the International Gay and Lesbian Association’s assessment in 2008, a total of 38 African countries had laws under which homosexuality was illegal.

The international community in 2011 threatened African states with reducing aid if they continued to toughen anti-gay laws. But that did not achieve the desired effects: some countries simply doubled down on the prohibition.

For the majority of countries on the continent, homosexuality is not a question of rights, but of culture and values. For instance, so much as recognizing that a same-sex relationship even exists is outlawed in the majority of countries, excluding only Senegal, Ethiopia and Saint Helena (UK territory) – who appear to have no opinion on the matter.

However, in the French territories of Mayotte and Reunion, there has been no prohibition of homosexuality for more than 200 years.

South Africa’s constitution is very liberal on LGBT rights, guaranteeing rights to same-sex couples and allowing same-sex marriage. Its anti-discrimination laws apply to both straight and same-sex couples, including the right to change one’s gender if desired.