Washington CNN  — 

The Supreme Court on Tuesday said an individual cannot make a claim that he was arrested in retaliation for exercising his free speech if police had probable cause for his arrest.

The ruling is a victory for law enforcement, which argued in favor of a bright line rule that officers could follow that would also defeat possible frivolous claims from defendants objecting to their arrest.

The case concerned a man in Alaska who says he was arrested in retaliation for speech that is protected under the First Amendment. At issue before the court was a question that has divided lower courts: if police have probable cause to make an arrest, does that defeat a claim of retaliatory arrest?

The man, Russell Bartlett, was arrested in 2014 in Alaska while attending the Arctic Man festival, an extreme ski and snowmobile event held annually in the Hoodoo Mountains.

Although police and Bartlett maintain different accounts of what happened before the arrest, there is no dispute that after an altercation, Bartlett was arrested for disorderly conduct. Charges against him were later dropped, but he sued, arguing that he was arrested because he spoke out against the officers.

Bartlett’s lawyer points to video that captured part of the event and says the trooper’s account of the arrest is dishonest.

The 9th US Circuit Court of Appeals had previously ruled in favor of Bartlett, holding that probable cause didn’t preclude a claim of retaliatory arrest.

The ruling was 7-2, with Justices Ruth Bader Ginsburg and Sonia Sotomayor dissenting. Justices Neil Gorsuch and Clarence Thomas did not join all aspects of the majority opinion.

During oral arguments last year, Chief Justice John Roberts at one point suggested sympathy for the officers that day, referring to the event as being “10,000 mostly drunken people” in the middle of nowhere. Roberts wrote the majority opinion Tuesday.

Justice Samuel Alito, on the other hand, worried during arguments about finding a line that would toss out frivolous claims but protect claims with merit, such as a journalist who wrote something critical of a police department and then later is given a “citation for driving 30 miles an hour in a 20-25 mile an hour zone.”