AUSTIN, Texas (AP) _ The Texas House has voted to require that prison officials perform mental health assessments on inmates before placing them in solitary confinement _ and refrain from doing so if medical clearance isn’t granted.

The bill by El Paso Democratic Rep. Marisa Marquez was approved Thursday by a voice vote. It needs a final, largely ceremonial vote to clear the House.

Under the proposal, inmates ordered to solitary confinement would be examined by medial staff. If the staff determines that solitary confinement would be harmful, the inmate would instead be placed in an available inpatient psychiatric facility.

According to a report released in February by the American Civil Liberties Union, more than 6,500 Texas inmates live in solitary confinement _ and a third have been diagnosed with mental illness.