A Haddon Township commissioner pleaded guilty Wednesday to taking a payment from a law firm in connection with a lawsuit against the township and has resigned his post, New Jersey Attorney General Gurbir S. Grewal announced.

Paul Dougherty, 48, a lawyer who also has served as a municipal prosecutor in several South Jersey towns, was permanently barred from public office or holding any public job in New Jersey, Grewal said.

Dougherty, who had been a commissioner since 2007, pleaded guilty before Superior Court Judge Edward J. McBride Jr. in Camden County to one count of third-degree conspiracy to confer an unlawful benefit on a public official.

In recent months, Dougherty has been mired in a controversy after the Courier-Post reported in August that he was charged with leaving the scene of a vehicle accident on July 19 in Camden County. The Courier-Post reported that Dougherty submitted his resignation to Haddon Township on Tuesday. No reason was given. He had failed to attend commission meetings in August and September.

Dougherty also resigned his posts as municipal prosecutor in Cherry Hill and Medford Township.

Prosecutors said Dougherty in 2013 was contacted by a Haddon Township police officer who had just been suspended and wanted help from the commissioner.

Dougherty told her she had the basis for a lawsuit against the township and referred her to a law firm, prosecutors said. The law firm sued the township and obtained a $48,000 settlement for the police officer in 2015. The details of the lawsuit or the identity of the law firm were not disclosed in Grewal's announcement.

The law firm, which collected about $21,000 in legal fees, paid Dougherty a $7,106 referral fee. He returned the fee after learning he was under investigation by the state Attorney General's Office, prosecutors said.

Under his plea deal, prosecutors are recommending that he be sentenced to probation. The investigation began with a referral from the Camden County Prosecutor's Office.

His sentencing is scheduled for Dec. 14.