A former Pennsylvania defense attorney who used to work as a county prosecutor has been sentenced to jail for preying on vulnerable clients for sex, state prosecutors announced Friday.

Corey Kolcharno, 49, was sentenced on Thursday to four months to nearly two years behind bars after previously pleading guilty in Lackawanna County to four felony counts of promoting prostitution. Kolcharno also was required to surrender his law license.

Between 2018 and 2022, when he was arrested, Kolcharno demanded sexual acts or materials in exchange for providing legal work, according to the attorney general’s office.

COLD CASES CRACKED IN 2023: UNSOLVED MYSTERIES THAT FOUND RESOLUTION

He targeted women who struggled with addiction, had been sexually abused or had financial problems, prosecutors said. Investigators have said they found hundreds of nude and sexually explicit images of Kolcharno’s clients on his cellphone.

“The defendant’s behavior in these cases was despicable. He preyed on clients and their relatives who had fallen on hard times and exploited their vulnerabilities for his own gratification,” Attorney General Michelle Henry said in a written statement. “This sentencing holds Kolcharno accountable for his crimes.”

PENNSYLVANIA MAN ACCUSED OF HAVING SEXUAL RELATIONSHIP WITH TEEN HE MET ON TINDER: REPORTS

Kolcharno was an assistant district attorney in Lackawanna County from 2005 to 2011.