LOS ANGELES — A federal bankruptcy court judge granted the city of San Bernardino eligibility for bankruptcy protection on Wednesday, raising the possibility that the city will propose a plan to dig itself out of debt by cutting money promised to the public pension system.

The ruling by Judge Meredith Jury came despite opposition from the powerful California Public Employees’ Retirement System, more commonly known as Calpers.

San Bernardino, a working-class city of 240,000 about 60 miles east of Los Angeles, declared Chapter 9 bankruptcy last summer, saying it had effectively run out of money to pay for day-to-day operations, in large part because of pension obligations.

Lawyers for Calpers had argued that the city should not treat pension funds like other creditors. For the past year, Calpers has also argued that the city has not provided enough documentation for the court to rule in the bankruptcy case and that the city had ignored warnings about a financial crisis for years and filed for bankruptcy as a matter of convenience.