WASHINGTON — In a decision likely to bolster the Washington Redskins’ efforts to protect their trademarks, the Supreme Court on Monday ruled that the government may not refuse to register potentially offensive names. A law denying protection to disparaging trademarks, the court said, violated the First Amendment.

The decision was unanimous, but the justices were divided on the reasoning.

The decision, concerning an Asian-American dance-rock band called the Slants, was viewed by a lawyer for the Washington Redskins as a strong indication that the football team will win its fight to retain federal trademark protection.

Lisa S. Blatt, a lawyer for the team, said the decision “resolves the Redskins’ longstanding dispute with the government.”

“The Supreme Court vindicated the team’s position that the First Amendment blocks the government from denying or canceling a trademark registration based on the government’s opinion,” she said.