SACRAMENTO — A panel of three federal judges on Tuesday ordered California to reduce its prison population by 40,000 inmates over the next two years, imposing by judicial order what the governor and Legislature have been unable — or unwilling — to do.

U.S. District Senior Judges Thelton Henderson and Lawrence Karlton and Ninth Circuit Judge Stephen Reinhardt said the state’s “severely overcrowded” prison conditions deny California’s 150,000 inmates constitutional access to adequate medical care. The three liberal lions of the federal bench gave state leaders 45 days to submit a plan for shrinking the inmate population.