(AP) - Already facing a potential contempt order, Gov. Jerry Brown now must leap another hurdle to meet a court-ordered deadline this week to say how he will reduce crowding in California prisons. The federal official who controls medical care in California prisons on Monday ordered thousands of high-risk inmates out of two Central Valley prisons in response to dozens of deaths due to Valley fever, which is caused by an airborne fungus. The order came four days before the administration's midnight Thursday deadline to file a plan with the federal courts outlining what steps it will take to reduce the prison population by an additional 9,000 inmates by year's end. The order stems from a court finding that lowering the inmate population is the best way to improve inmate medical and mental health care. Brown has been threatened with contempt of court if he does not meet the court-ordered population reduction, although he has promised to appeal to the U.S. Supreme Court. Monday's directive by medical receiver J. Clark Kelso further undermines the Democratic governor's attempts to regain control of state prisons after two decades of federal oversight. Kelso ordered the Department of Corrections and Rehabilitation to exclude black, Filipino and other medically risky inmates from Avenal and Pleasant Valley state prisons because those groups are more susceptible to the fungal infection, which originates in the region's soil. "If we were to move hundreds or thousands of inmates from two prisons and swap them with prisoners in other prisons, that wouldn't necessarily conflict with the court (crowding) order, but it would add another layer of complexity," corrections department spokesman Jeffrey Callison said. Such a move "would be a massive undertaking at a time when other, similar measures may have to start to be in compliance with the court (crowding) order." The department is trying to determine if Kelso has the unilateral authority to decide where inmates are housed. Nevertheless, his order puts the administration in a bind as it searches for answers: Where does it send more than 3,000 inmates if the state's 33 adult prisons already have been deemed overcrowded by the courts? And can it do a prisoner swap by transferring other inmates to the two Central Valley prisons if the prisons have been judged so unhealthy that some inmates have been ordered out? California already has about 8,500 inmates housed in private prisons in other states and has enacted a sweeping criminal justice realignment law that is sending thousands of lower-level felons to county jail instead of state prison. It's not clear what options are left to reduce crowding further, and Brown has challenged the court by saying he does not want to release dangerous felons back on the street. Meanwhile, attorneys representing inmates are asking a federal judge to intervene in the valley fever development as part of a lawsuit filed more than a decade ago that seeks to improve prison medical care. The issue surfaced again Monday after a doctor hired by the law firms representing inmates filed a sworn declaration with the federal court saying Avenal and Pleasant Valley should be shut down. Here's another example why that isn't true," said Don Specter, director of the Prison Law Office that filed the lawsuit. Prisoners are dying because they're in a toxic environment which causes serious illness and death on a regular basis.