By Melinda Dickinson

BIRMINGHAM, Alabama (Reuters) - A federal judge on Wednesday cleared the way for Alabama's bankrupt Jefferson County to shut down in-patient services at a government hospital for poor people that loses $10 million a year.

Jefferson County, which filed a $4.23 billion bankruptcy nearly a year ago, says it can no longer afford to cover the losses for a 319-bed, in-patient operation that serves only a few dozen people on an average day.

But Birmingham, Alabama's biggest city and the Jefferson County seat, had asked U.S. Bankruptcy Court Judge Thomas Bennett to keep the city-based Cooper Green Mercy Hospital in full operation.

The county proposes to replace Cooper Green's emergency room with an urgent care facility and to provide indigent care through outpatient clinics. Patients needing hospitalization would be sent to other hospitals, which would bill the county.

Bennett, in rejecting Birmingham's request, said state law did not require Jefferson County to run a hospital, though it was obliged to pay for the medical care of the poor.

Chapter 9 municipal bankruptcy also protects Jefferson County, whose finances were crippled by sewer debt and the loss in 2011 of a local jobs tax worth $60 million a year, from new lawsuits, Bennett said.

"As long as the county pays, it is in compliance with law," Bennett said during a court hearing in Birmingham. "The city is attempting to exercise control over property of the debtor."

The judge said he expects his ruling to be appealed.

Last month, Jefferson County's commissioners approved a slimmed-down, $205.2 million annual operating budget that uses withheld bond-interest payments and asset sales to offset revenue shortages. The new budget is $12 million smaller than the one for the fiscal year that ended September 30 and $107 million below the previous fiscal year's total.

(Additional reporting by Michael Connor in Miami; Editing by Leslie Gevirtz)