A former Rumson municipal court judge who admitted illegally diverting more than $500,000 in court fines will avoid prison, and could have his crime expunged from official records, the Asbury Park Press reported Friday.

Richard B. Thompson, 62, a Middletown attorney who also served as judge in eight other towns, was admitted to the state’s pretrial intervention program by the Monmouth County Prosecutor’s Office, the Press reported.

The deal means Thompson, who faced up to 18 months in prison, will have the records-falsification charge to which he pleaded guilty dismissed after one year, and he’ll be eligible to have his record expunged after another six months, the Press reported.

In February, Thompson pleaded guilty in state Superior Court to falsifying records in more than 4,000 cases as part of a scheme of fixing court dispositions to benefit municipalities where he served as a judge, said in the announcement.

His apparent aim, according to Prosecutor Christopher J. Gramiccioni, was to curry favor with local officials who appointed him.

Thompson admitted that on numerous from January 2010 to October 2015, he suspended fines he issued in connection with the disposition of motor vehicle tickets and improperly converted those monies to contempt of court assessments. The purpose of this scheme was to steer monies to the municipalities that employed him as a municipal court judge, Gramiccioni said.

Thompson was suspended from all nine benches in October, 2015 pending an investigation by New Jersey’s Advisory Committee on Judicial Conduct. The underlying reason for the suspensions was not publicly known at the time.

According to an Asbury Park Press report at the time of the suspensions, Thompson sat in Bradley Beach, Colts Neck, Eatontown, Middletown, Neptune City, Oceanport, Tinton Falls and Union Beach, in addition to Rumson, and  earned $217,500 from judgeships in 2014, when he was on the bench  in six municipalities.

As part of his guilty plea, Thompson forfeited the ability to hold public office again, according to the Press. However, it’s unclear if he will be able to practice law in New Jersey; he has a private practice that Google shows has an office on Route 35 in Middletown.

From the Press:

Neither the prosecutor’s office nor the state Administrative of Courts, which oversees municipal court judges and manages the software that divvies up the money for local courts, have said whether towns would be liable to pay back the money to the county.

It’s also unclear as to whether any court staff knew about the changes Thompson was making, and whether he was making them on paper or altering the computer records.

Thompson was one of the highest-paid judges in the state. By cobbling together the multiple part-time judgeships in the towns, he was paid a total of $217,400 in 2014, his last full year as a judge.