Gabon’s senate has strongly voted in favour of decriminalising homosexuality, a week after the lower house in the national assembly voted for a similar change.
If the move is ratified by the president, Gabon will become one of only a few African countries to legally allow homosexuality.
A number of prominent politicians, as well as Christian and Muslim leaders, have reacted angrily, describing it as a change designed to appease foreign donors.
Last year, the central African nation criminalised homosexuality and made gay sex punishable with six months in prison and a large fine. Activists said that the move had sent the LGBT community further underground and had led to harassment.
Many African countries impose jail sentences on homosexuals, who are in some cases threatened with the death penalty.