The top court in Mexico has ruled that two words, both anti-gay slurs which are commonly used in the country, are hate speech, and therefore should not be protected as freedom of speech under the constitution.

The ruling by the Supreme Court could mean that those offended by the use of the words could sue for moral damages.

Magistrates voted 3-2 on Wednesday evening, supporting a claim by a journalist from Puebla, who sued a reporter from a different publication who had referred to him as a “punal”, and other people at his newspaper as “maricones”.

Both of the words in question roughly translate into the word “faggot” in English, reports the Associated Press.

The ruling by the majority of the magistrates meant that both words were deemed discriminatory and offensive. Their ruling said: “Even though they are deeply rooted expressions in Mexican society, the fact is that the practices of the majority of society can’t validate the violations of basic right.”

The decision by the court was praised by the gay and lesbian community in Mexico, as well as anti-discrimination activists, who deemed this a step forward for the country.

Others were critical of the ruling, saying other words, particularly those used to refer to poor people, should be added to the list.

Mexico’s National Council to Prevent Discrimination released a statement saying: “The historic resolution … marks the first precedent in the discussion of the limits of freedom of expression versus the right to non-discrimination.”

The director of Letter S, a gay rights group in Mexico, Alejandro Brito, told the Associated Press that the country still had a long way to go before the attitude of anti-gay Mexicans was changed, but that the resolution would help Mexico to move towards more respect for gay people.

“This will inhibit the use of the words in public forums and the media, and that’s very positive,” Brito said. “But this doesn’t mean that the person who stops saying these words will stop being homophobic.”

Mexico is moving towards improving attitudes towards gay people, and it enacted a law in 2010 allowing gay couples to adopt, and insisting that same-sex marriages from Mexico City be recognised nationwide.

Many have said that discrimination and violence against gay people remains a serious problem, however.