Updated

An Asian-American rock band called the Slants have won a major legal battle over their name after the U.S. Supreme Court struck down part of a law that bans offensive trademarks in an 8-0 ruling Monday.

"After an excruciating legal battle that has spanned nearly eight years, we’re beyond humbled and thrilled to have won this case at the Supreme Court," the band said in a statement. "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."

They added, "Music is the best way we know how to drive social change: it overcomes social barriers in a way that mob-mentality and fear-based political rhetoric never can."

The Slants' legal battle began in 2011 when the band's founder, Simon Tam, tried to trademark the band name in 2011, but was denied by the U.S. Patent and Trademark Office on the ground that it disparages Asians.

Tam told Fox News in January he named the band the Slants because "it represented our perspective—or slant—on life as people of color."

"It was a deliberate act of claiming an identity as well as a nod to Asian-American activists who had been using the term for decades. It was a way to address a false stereotype and to destigmatize the slur," Tam told us.

A federal appeals court had sided with the Slants in 2015, saying First Amendment protects "even hurtful speech that harms members of oft-stigmatized communities."

The case was closely watched for the impact it would have on the separate dispute involving the Washington Redskins.

The Redskins made similar arguments after the trademark office ruled in 2014 that the name offends American Indians and canceled the team's trademark. A federal appeals court in Richmond put the team's case on hold while waiting for the Supreme Court to rule in the Slants case.

The Associated Press contributed to this report.