WASHINGTON (AP) The Supreme Court on Monday struck down part of a law that bans offensive trademarks, ruling in favor of an Asian-American rock band called the Slants and giving a major boost to the Washington Redskins in their separate legal fight over the team name.

The justices were unanimous in saying that the 71-year-old trademark law barring disparaging terms infringes free speech rights guaranteed in the Constitution's First Amendment.

"It offends a bedrock First Amendment principle: Speech may not be banned on the ground that it expresses ideas that offend," Justice Samuel Alito said in his opinion for the court.

Slants founder Simon Tam tried to trademark the band name in 2011, but the U.S. Patent and Trademark Office denied the request on the ground that it disparages Asians. A federal appeals court in Washington later said the law barring offensive trademarks is unconstitutional and the Supreme Court agreed.

The Redskins made similar arguments after the trademark office ruled in 2014 that the name offends American Indians and canceled the team's trademark. That case, before a federal appeals court in Richmond, had been on hold while the Supreme Court considered the Slants case.

Tam insisted he was not trying to be offensive, but wanted to transform a derisive term into a statement of pride. The Redskins also contend their name honors American Indians, but the team has faced decades of legal challenges from Indian groups that say the name is racist.

Tam said the band was "beyond humbled and thrilled" with the ruling.

"This journey has always been much bigger than our band: it's been about the rights of all marginalized communities to determine what's best for ourselves," he said.

Despite intense public pressure to change the Redskins name, team owner Dan Snyder has refused, saying in the past that it "represents honor, respect and pride" for Native Americans. Snyder issued a quick statement after Monday's decision: "I am THRILLED. Hail to the Redskins."

"The Supreme Court vindicated the team's position that the First Amendment blocks the government from denying or cancelling a trademark registration based on the government's opinion," Blatt said.

Trademark office spokesman Paul Fucito said officials are reviewing the court's ruling and planned to issue further guidance on how they will review trademark applications.

Indian groups opposing the Redskins said the ruling does not change the fact that the name "is a dictionary-defined racial slur."

"If the NFL wants to live up to its statements about placing importance on equality, then it shouldn't hide behind these rulings, but should act to the end this hateful and degrading slur," said a joint statement from the National Congress of American Indians and the group Change the Mascot.

The ruling means offensive trademarks can no longer be denied, even for names that intend to disparage individuals or groups of people, said Megan Carpenter, dean at the University of New Hampshire School of Law and an expert on trademark law.

While the justices all agreed on the outcome, they split in their rationale. Alito rejected arguments that the government has an interest in preventing speech that is offensive to certain groups.

"Speech that demeans on the basis of race, ethnicity, gender, religion, age, disability, or any other similar ground is hateful; but the proudest boast of our free speech jurisprudence is that we protect the freedom to express the thought we hate," Alito said in a part of his opinion joined by Chief Justice John Roberts and Justices Clarence Thomas and Stephen Breyer.

Writing separately, Justice Anthony Kennedy stressed that the ban on disparaging trademarks was a clear form of viewpoint discrimination forbidden under the First Amendment.

"A law that can be directed against speech found offensive to some portion of the public can be turned against minority and dissenting views to the detriment of all," Kennedy said in an opinion joined by Justices Ruth Bader Ginsburg, Sonya Sotomayor and Elena Kagan.

Justice Neil Gorsuch took no part in the case, which was argued before he joined the court.

Government officials said the law did not infringe on free speech rights because the band was still free to use the name even without trademark protection. The same is true for the Redskins, but the team did not want to lose the legal protections that go along with a registered trademark. The protections include blocking the sale of counterfeit merchandise and working to pursue a brand development strategy.

Critics of the law said the trademark office has been wildly inconsistent over the years in deciding what terms are too offensive to warrant trademark protection. The government has in the past rejected trademarks for the terms "Heeb" and "Injun," but allowed those for companies such as Baked By A Negro bakery products, Midget Man condoms, and Dago Swagg clothing.