(Editor’s note: contains language that some readers may find offensive)

WASHINGTON (Reuters) - The Supreme Court on Monday struck down a longstanding U.S. ban on trademarks on “immoral” or “scandalous” words and symbols, ruling in a case involving a clothing brand with an indelicate name that the law violates constitutional free speech rights.

The justices ruled against President Donald Trump’s administration, which defended the law that had been in place since 1905, and in favor of Los Angeles streetwear designer Erik Brunetti, who was turned down by U.S. Patent and Trademark Office when he sought to trademark his brand name FUCT.

All nine justices agreed in the decision written by liberal Justice Elena Kagan that the prohibition on “immoral” trademarks ran afoul of the U.S. Constitution’s First Amendment right to free expression. However, three justices wrote dissents to say the bar on “scandalous” trademarks should have been upheld.

The Supreme Court followed a course it took in 2017 when it struck down a similar law forbidding the registration of “disparaging” trademarks in a case involving an Asian-American dance rock band called The Slants, a name federal trademark officials had deemed offensive to Asians.

When the 2011 trademark application for FUCT was rejected, the Patent and Trademark Office noted that brand name sounds like a profanity - sometimes politely called the “F-word” - though is spelled differently, and concluded that Brunetti’s products contained sexual imagery, misogyny and violence.

“There are a great many immoral and scandalous ideas in the world (even more than there are swear words),” Kagan wrote in Monday’s decision, adding that the trademark law covers them all. “It therefore violates the First Amendment.”

“Today is a good day for Americans,” Brunetti’s lawyer John Sommer said. “The U.S. Supreme Court has taken the government out of the business of deciding questions of morality.”

The Patent and Trademark Office said it was reviewing the decision. The Justice Department declined to comment.

Slideshow ( 3 images )

The justices, who are due to wrap up their current term in the coming days with a handful of other major rulings on tap, upheld a 2017 lower court ruling striking down the law. The decision removes the authority of government officials to bar federal trademark registration for profane language or sexually graphic images.

The Trump administration had warned that invalidating the law would unleash a torrent of extreme words and sexually graphic images on the marketplace.

Brunetti’s brand includes products such as a pullover sweatshirt saying “The world is fuct,” sweatpants saying “We are fuct,” and a T-shirt saying “Fuct is free speech, free speech is fuct.”

‘ODIOUS RACIAL EPITHET’

Justices Sonia Sotomayor, Stephen Breyer and John Roberts were the three justices who partly dissented. Sotomayor said the government will now have no choice but to register “the most vulgar, profane or obscene words and images imaginable.”

Breyer said such words could even lead to physical altercations. “Just think about how you might react if you saw someone wearing a t-shirt or using a product emblazoned with an odious racial epithet,” Breyer said.

Brunetti sought a trademark because it would make it easier to protect his brand of casual clothing against counterfeiters. The brand’s name is clever, Brunetti said, because of its association with the profanity, while the acronym also means “Friends U Can’t Trust.”

The U.S. Court of Appeals for the Federal Circuit, which specializes in intellectual property law, ruled in Brunetti’s favor in 2017.

Slideshow ( 3 images )

The American Civil Liberties Union called the ruling a victory for the First Amendment. “Government bureaucrats should not be deciding what speech is or is not deserving of trademark protection based on what they consider to be too ‘scandalous’ and ‘immoral,’” ACLU attorney Emerson Sykes said.

The Trump administration had argued that banning vulgar terms and sexually indecent images did not discriminate against anyone’s viewpoint, and that the government should not be forced through the trademark system to promote words and images that would be shocking or profane to the public.

On Monday, Kagan offered examples of the law’s bias toward certain views, highlighting the government’s approval of anti-drug or pro-religious messages but rejection of a trademark for “Bong Hits 4 Jesus.”

The dissenting justices suggested the “scandalous” provision of the law could be salvaged to forbid obscenity or profanity because it does not attack ideas, but only the way in which ideas are expressed.

Justice Samuel Alito, who agreed to strike down the law, said Congress could come up with a narrower statute banning vulgarity that conveys only emotion. “The registration of such marks (trademarks) serves only to further coarsen our popular culture,” Alito said.

The case marked the latest important free speech decision by the justices.

In another free speech case decided last year, the court struck down a Minnesota law prohibiting apparel bearing political messages in polling sites.

Also last year, the court blocked a California law requiring clinics that counsel women against abortion to notify clients of the availability of abortions paid for by the state, finding that it violated the free speech rights of the Christian-based facilities..

For a graphic on major Supreme Court rulings, click tmsnrt.rs/2V2T0Uf