Raleigh, NC (AP) — A state trooper’s decision to stop a driver who flashed an obscene hand gesture wasn’t justified, the North Carolina Supreme Court ruled Friday, overturning lower court decisions.

The justices ruled unanimously that the evidence showed Trooper Paul Stevens lacked reasonable suspicion to pull over Shawn Patrick Ellis for disorderly conduct on a Stanly County road in January 2017.

Stevens and a local police officer had stopped to help a stranded motorist out of gas a few days after a snowstorm when Stevens noticed what turned out to be Ellis in another vehicle.

Ellis’ back-and-forth waving motion with his hand outside the window turned into a pumping up-and-down motion with his middle finger, court documents say.

Stevens pursued Ellis’ SUV in his cruiser, with blue lights still flashing, for a half-mile before Ellis stopped. Ellis initially refused to identify himself, and Stevens ultimately cited him for resisting, delaying or obstructing an officer.

The trial judge refused to suppress Stevens’ testimony in the case. Ellis pleaded guilty to the count but said he planned to appeal.

A divided panel of the Court of Appeals upheld the judge’s denial to leave out the trooper’s statement, saying there was reasonable suspicion for the stop.

Associate Justice Robin Hudson, writing Friday’s opinion, said Stevens’ testimony leads to inferred facts that the trooper didn’t know whether Ellis’ gesture was directed at him or another driver. Stevens also didn’t observe traffic violations or other suspicious behavior during the pursuit, she wrote.

“The mere fact that defendant’s gesture changed from waving to ‘flipping the bird’ is insufficient to conclude defendant’s conduct was likely to cause a breach of the peace,” Hudson wrote while returning the case ultimately to the trial court.

Lawyers for the state, who defended the prosecution, had initially said the stop was lawful under an exception to prevent harm in emergency conditions. The Court of Appeals rejected that line of argument, and the Department of Justice said the evidence didn’t establish reasonable suspicion.

An arm of the American Civil Liberties Union in North Carolina filed a brief siding with Ellis, saying that raising the middle finger is protected speech.

The case “is a textbook example of how public officials criminalize dissent and criticism,” ACLU attorney Irena Como wrote.