(CNN)Angola has decriminalized same-sex relationships, according to Human Rights Watch agency.
The agency also reported that the Angolan government had created new sets of laws that ban discrimination against people because of their sexual orientation.
Individuals who refuse people employment or services because of their sexual orientation could spend up to two years in jail under the new law.
Angola's parliament adopted a new penal code on January 23 for the first time since it gained independence from Portugal in 1975, paving the way for lawmakers to remove the provision characterizing same-sex relationships as "vices against nature," the rights agency said.
"In casting aside this archaic and insidious relic of the colonial past, Angola has eschewed discrimination and embraced equality," the Human Rights Watch said in a statement Thursday.
Angola joins the growing but few numbers of African countries that have decriminalized same-sex relationships.
Neighboring Mozambique removed anti-gay laws in 2015, while Sao Tome and Cape Verde have also abolished laws criminalizing gay relationships.
Despite the changes, LGBT people and communities still face prosecution and hatred in many African countries.