NEWARK, N.J. (CBSNewYork) — The Essex County, N.J., Prosecutor’s office has set up a new initiative to steer nonviolent offenders with mental health problems toward treatment programs rather than prison time.

The Essex County initiative is modeled after a similar program in Union County, according to a news release issued Monday. Under the plan, anyone with a history of mental illness who gets accused of a crime will be evaluated and linked to services in their community.

READ MORE: Jury Reaches Verdict In R. Kelly Sex Trafficking, Racketeering Trial

The goal is to ensure those affected by mental illness get long-term treatment, so as to present them from committing more crimes or more serious crimes, the release said.

Criminal defendants eligible for the program will be picked on a case-by-case basis, but must be residents of Essex County who were charged with a crime within the county. Their mental health problems must have played a role in the crime they committed, and they cannot have a history of violent crimes.

READ MORE: 2 NYPD Officers Seriously Injured By Fireworks Blast In Queens

Those with traumatic brain injuries or intellectual disabilities will be admitted under different criteria, the news release said.

The Prosecutor’s office also joined the Public Defender’s office to meet with jail staff and discuss treatment of inmates with diagnosed mental illness, the release said.

Nationwide, statistics show about 25 percent of inmates in state prisons or county jails have a recent history of mental health disorders, the release said.

MORE NEWS: Nestlé Recalls DiGiorno Frozen Pizzas That Were Mislabeled, May Contain Allergen

Do you think more needs to be done to keep mental health patients out of the jail? Please leave your comments below…