MONTGOMERY, Ala. (AP) — Last year John Chandler, 33, made the decision to step away from his job as a correctional officer at Limestone Correctional Facility after eight years with the state prison system.

Too few officers trying to control too many inmates, he said, were creating dangerous conditions for both, and he saw no hope that the situation was going to get better anytime soon.

"Officers are getting stabbed. Inmates are getting extorted," Chandler said. "There's no control. It's not that the officers don't want to do the job. It's that there are no officers to do the job," Chandler said.

Faced with a court order to improve conditions inside state prisons, Alabama is trying to address a shortage of correctional officers.

As of June 2018, the Alabama Department of Corrections said it has 2,070 correctional officers, but said that includes supervisors, part-time correctional officers and trainees.

Alabama Corrections Commissioner Jeff Dunn said estimates filed with the court show the state needs to add between 1,800 and 2,000 officers — almost doubling current staffing levels.

The court directive to boost officer staffing came out of a lawsuit filed over prison health care.

U.S. District Judge Myron Thompson last year ruled mental health care was "horrendously inadequate" in state prisons and said that low staffing and overcrowding are the "overarching issues."

The officer shortage is intertwined with overcrowding and violence. As prison populations ballooned in the 1990s and early 2000s so did incidents of violence inside prison walls.

"I think you can associate the rise in our prison population and the slow decline in our staff inside the prisons initially with our violence rates," Dunn said.

Corrections Officer Kenneth Bettis died in 2016 after being stabbed by an inmate at William C. Holman Correctional Facility in Atmore.

In fiscal year 2017, nine inmates were killed in homicides inside state prisons, according to department statistics. Ten officers and more than 200 inmates were seriously injured in assaults.

Inmates "are getting beat up and extorted. Family members are getting calls: 'You got send this $200 or we'll kill your son,'" Chandler said.

Safety is the top reason correctional officers quit, according to Randall McGilberry, president of the Alabama Corrections Officer Association.

"They are always outnumbered," he said.

Southern Poverty Law Center attorney Maria Morris, who is representing state inmates in the lawsuit, said she frequently hears from inmates that mental health workers cannot do rounds because there are not correctional officers to escort them. It also provides fewer people to check on inmates, which she said has been a contributing factor in inmate suicides.

The Department of Corrections is supposed to submit a plan on how it will increase officer ranks.

As an initial measure, the department authorized a five and 10 percent pay increase for officers at minimum and maximum security prisons. The raise will boost the starting salary for entry-level correctional officers from $28,516 to $31,368 at maximum security prisons and $29,942 at medium security facilities.

Dunn said it is a pay incentive to take jobs at those prisons, but acknowledges that "is no way the long-term solution."

He said the state will have to address the overall compensation, recruiting efforts, and other initiatives to entice veterans to stay.

Thompson has indicated he wants the staffing levels raised significantly by 2022. Dunn said it will take a "concerted effort" by the department and Alabama Legislature to meet that expectation.

"I hope we in the state of Alabama don't pass on this opportunity to really fix a longstanding 30 year problem," Dunn said.