PHOENIX (AP) _ A federal judge has denied the Arizona Department of Correction's motion for summary judgment in a class-action lawsuit over the quality of health care in the state's prisons.

The suit seeks adequate medical, mental health and dental care for prisoners and challenges the use of use of solitary confinement in Arizona's prison system.

Thursday's ruling by U.S. District Court Judge Neil Wake in Phoenix sets the stage for an Oct. 20 trial on behalf of 33,000 prisoners in the state's 10 prisons. 

The American Civil Liberties Union, ACLU of Arizona and the Prison Law Office filed the federal lawsuit in 2012.

Wake certified the case as a class action in March 2013. The 9th U.S. Circuit Court of Appeals in San Francisco unanimously affirmed a lower court ruling in June.