U.S. Bankruptcy Judge Meredith Jury confirmed San Bernardino's bankruptcy plan Tuesday, clearing the way for the city to exit bankruptcy after more than four years.

City officials don't expect the plan—a comprehensive blueprint for how much the city will pay creditors and when—to become effective until March, after at least one more court hearing. But they celebrated Tuesday's hearing as historic.

City leaders were elated that the bankruptcy saga is ending. While direct costs of the bankruptcy—attorneys and consultants—cost more than $20 million, the debts that were being discharged saved the city and its taxpayers more than $300 million.

Many of the city’s creditors will received far less than they might otherwise have been entitled to; for some, just one penny for every dollar owed. The plan also modified the city structure, including outsourcing of some services like garbage and fire, and brought forth a new city charter.

While resolution of the San Bernardino bankruptcy took longer than Detroit and other California cities like Vallejo and Stockton, people are glad the exit plan is underway.

"Here the city had the challenge of being not only economically viable but politically palatable," said attorney Vincent J. Marriott, representing bondholders who invested about $50 million in the city. "As is appropriate, that took time. I think the result today is really a tribute to all the work and thought that went in from the city."