The state’s highest court, in a decision reaffirming the conviction of a former high-ranking Nassau deputy police commissioner on Thursday, surgically dissected the difference between official misconduct and the kind of activity that’s become almost normalized on Long Island.

It’s an important decision, but only if it empowers local district attorneys to more vigorously pursue official misconduct allegations — corruption, to put it plainly.

By unanimous decision, the state Court of Appeals upheld the conviction of former Nassau County Police Deputy Commissioner William Flanagan on conspiracy and two counts of official misconduct — stemming from a 2009 case of theft of $11,000 worth of computers and electronic equipment from John F. Kennedy High School in Bellmore in which police tried to avoid arresting a suspect. An attorney for Flanagan, Donna Aldea, told Newsday that she intended to seek reargument in the case.

The court, in a 29-page decision, carefully outlined what happened with the police investigation of the theft: What went right, and what went wrong after officers were ordered to deviate from normal police procedures.

Talk about good cop, bad cop. Only this time around, it was the efforts of officers just trying to do their jobs being derailed by brass from on high.

The officer who responded to the report of the theft filled out the proper form, had it signed by the school principal — who, even then, wanted police to make an arrest. The officer went so far as to note case numbers of prior thefts at the school on the back of the form, before calling in so the case could be logged in the department’s computer system.

Had things gone according to department protocol, a detective ultimately would have investigated — probably viewing video surveillance from the school — before moving toward an arrest. But the student the principal suspected in the theft, Zachary Parker, was a police department intern; and his father, Gary, was, as the court noted, “a longtime benefactor of the NCPD who regularly entertained high-ranking members of the department.”

Instead of the investigation going forward, a detective, the court notes, was instructed — repeatedly — to get the principal to agree not to press charges. In addition, evidence recovered in the case was not logged in as required by department policy.

It would be months before the younger Parker was arrested — and then only after a story in the Long Island Press led the Nassau district attorney’s office (which had been kept “in the dark,” the court noted) to investigate.

Flanagan, in appealing his 2014 conviction, argued that there could be no misconduct for actions he believed were discretionary for police during crime investigations.

But the court found otherwise. “This was not a failure of an officer to perform a discretionary duty,” according to the decision, “but a disavowal of a sworn duty by a public official.”

Flanagan “and his accomplices sought to avoid the inexorable result that performance of such duty would have produced . . . thus, the evidence was sufficient to prove that defendant committed the crime of official misconduct by nonfeasance when he directed his accomplice officers to refrain from performing their fundamental duty to investigate a crime, a duty inherent in the nature of their office.”

Over the past two years, federal prosecutors have taken a lead role in rooting out official misconduct on Long Island. On Friday, Newsday’s Bridget Murphy reported that the Nassau DA has empaneled a special grand jury to investigate public corruption in the Town of Oyster Bay.

Rooting out — and, where appropriate, punishing — official misconduct on Long Island needs to become a constant. The court’s decision ought to bolster that job.