Even as activist groups continue to raise concerns over Brazilian president Jair Bolsonaro's views toward LGBT people, Brazil's supreme court voted to criminalize homophobia and transphobia similarly to its laws on racism.

Eight of Brazil's 11 Supreme Federal Court justices ruled on Thursday to include homophobia and transphobia within the country's laws prohibiting racism – a clause that would legally protect the country's LGBT community, which has among the highest rates of violent LGBT deaths in the world.

Justice Carmen Lucia argued in her ruling that the LGBT community is treated differently in Brazil's "discriminatory society," and as a result, it faces a higher rate of violence.

The country's laws banning racism were passed in 1989 and allow for sentences of up to five years.

Hate crimes on rise in US:Flag-burning during Pride Month prompts reflection on nation's rise in hate crimes

Laws in the US:7 maps show the mess LGBT laws are in the USA

Though Brazil has legalized same-sex marriages, violence in the country toward LGBT people is common. Four hundred twenty LGBT people were killed across Brazil in 2018, according to a report by Brazilian LGBT watchdog Gay Group of Bahia released this year, and at least 141 have been killed so far this year.

Along with controversial statements about rape and torture, Bolsonaro is outspoken about his beliefs on homosexuality. In a 2011 interview with Playboy Brazil, he said he would rather have a dead son than a gay son, and he repeated those statements in later interviews.

Contributing: The Associated Press

Follow Joshua Bote on Twitter: @joshua_bote