The New Hampshire Supreme Court has agreed with the state Department of Labor that a New Hampshire police chief was disciplined not because he was a whistleblower — but because he improperly accessed police records to investigate a local attorney.

The case stemmed from an ongoing dispute between Epsom Police Chief Wayne Preve and Tony Soltani, an Epsom attorney and former state representative who serves on that town’s budget committee.

In 2012, Soltani had been censured by the Supreme Court’s Professional Conduct Committee for interfering in a police chase in Epsom.

The latest trouble began with a courtroom confrontation between Soltani and an Epsom police officer in 2017, after which Preve decided to file a complaint of professional misconduct against Soltani to the Judicial Conduct Committee. According to documents in the case, the chief searched the police department’s confidential database for information about Soltani and his family members and forwarded those materials to the JCC.

However, since the JCC does not handle complaints against attorneys, that committee sent Preve’s letter back to the town.

The Epsom Board of Selectmen hired an independent consultant to investigate Preve’s actions, and that company found that the chief had violated privacy laws, according to the Department of Labor’s decision. That’s when Preve was suspended for a week without pay.

Preve had appealed his suspension, arguing that it was retaliation against him as a whistleblower. But DOL dismissed that appeal last November, and Preve took his appeal to the Supreme Court.

The court noted that DOL concluded that the town’s concerns “regarding the potential impropriety of the petitioner’s inclusion of private information obtained from the Town’s confidential database with the complaint were the primary motivation for the discipline.”

In its suspension letter, town officials had written that Preve had participated in gathering and printing unredacted police records, “despite the fact that they included not only personally identifying information about (Soltani) such as his social security number, address, birth date, and birthplace; but also included such information about his children,” according to court documents.

The Supreme Court justices on Thursday unanimously upheld the DOL ruling, concluding: “The record supports the DOL’s conclusion.”

Preve, who remains Epsom’s police chief, is on vacation this week and could not be reached for comment on the court decision.