A new penal code in Mozambique will soon come into effect under which same-sex intimacy is no longer illegal.

The new criminal code is set to come into effect in June, and removes a clause which previously allowed “security measures” to be taken against people “who habitually engage in vices against nature.”

Although homosexuality was not specifically mentioned under the old penal code, it was sometimes interpreted that “vices against nature” referred to same-sex intimacy.

The previous penal code had been in place, aside from some amendments, since Mozambique was a Portuguese colony, and was written in 1887.

Although homosexuality will soon be legal in Mozambique, the law will still offer no protections for LGBT people against discrimination.

The new penal code was signed into law by the President of Mozambique Filipe Nyusi last December.

With the decriminalisation of homosexuality in Mozambique, the number of countries with laws criminalising same-sex activity falls to 78.

The change was celebrated by LGBT organisation Lambda, which has fought for greater rights for LGBT people for years.