A former Morrisville police officer who was convicted of using a law enforcement database to harass and threaten a couple that he believed were driving too slowly in front of him has been sentenced to 45 days in county jail, with the rest of his six-to-23-month sentence spent on work release and house arrest.

Michael Pitcher, 43, was sentenced Monday by Bucks County Judge Brian T. McGuffin, who convicted him in October of official oppression, terroristic threats, harassment, and unlawful use of a computer.

In a statement Tuesday, state Attorney General Josh Shapiro, whose office prosecuted the case, called the crime “an absurd abuse of power.”

Pitcher had been driving to work on April 6, 2019, when he encountered a Porsche Cayman driven by Jerry Shanks on River Road, according to trial testimony. Shanks, from his perspective, didn’t realize the aggressive driver who was following his car very closely and attempted to pass him multiple times was a police officer.

Not long after Shanks got home, he received a phone call from a man who didn’t identify himself but warned him to buy surveillance cameras because, he said, he was going to come over and destroy the Porsche, Shanks testified in October.

An investigation by Lower Makefield police and Bucks County detectives revealed that Pitcher waited until he was alone in the police station to use a public-records database exclusive to officers that helped him identify Shanks’ phone number through his car’s license plate. Pitcher then used a smartphone application to block his own phone number and called Shanks, and deleted evidence of his search.

At trial, Pitcher took the stand and said he did all of this in his official capacity as an officer: He said he was warning Shanks that he was driving recklessly, and the message got lost in translation.

McGuffin wasn’t swayed. He accused the 12-year veteran of abusing his authority.

“You called them to hassle them,” McGuffin told Pitcher. “To get back at them for some perceived affront against your authority.”

Pitcher will report to the county jail later this month. His attorney, Louis Busico, said he was grateful that McGuffin did not grant the prosecution’s request to have Pitcher serve the full term in jail.

Correction: An earlier version of this misstated the terms of Pitcher’s sentence.