SAN BERNARDINO >> The end to the city’s three-year-old bankruptcy is in sight, but the 20 years after exiting bankruptcy will still be tough, city officials tell their creditors and bankruptcy judge in the latest version of the bankruptcy exit plan.

The Plan of Adjustment and accompanying disclosure statement were filed Wednesday night, less than two hours before the midnight deadline, and mark the third version of a vision to exit bankruptcy and slowly begin to recover as a city.

The broad strokes are similar to the first version, filed in May 2015 — deep cuts to many creditors, extensive outsourcing and minimal service levels, without leaning on major tax increases — but city officials now say they’ve struck deals vital to progress.

“The Plan represents a major step forward for the city in its efforts to exit bankruptcy and breathe new life into the city’s economy,” the filing states. “All of the city’s principal creditor constituencies that initially opposed the city’s restructuring efforts now support the plan. That includes the City’s police, fire and other unions, the official retirees committee and CalPERS and the holder of the city’s bonds.”

There have been some significant changes in the last year.

For instance, to get the support of the city’s second-largest creditor, the holders of $50 million of pension obligation bonds, the city went from its initial proposal to pay the bondholders a penny on the dollar to about 40 cents for every dollar they’re owed.

And the plan to outsource fire services has morphed into a plan to annex the city into a county fire protection district — a plan that includes a yearly tax of $148 per parcel (increasing by up to 3 percent per year).

The plan also now includes reinvestment in the Police Department. Police staffing was reduced 30 percent since 2008, from 356 to 248, and the city’s crime — the second-highest Part 1 crime rate (violent and property crimes) among the 63 California cities with a population between 100,000 and 400,000 — hampers efforts to attract residents and businesses, the plan says.

The plan calls for an additional $91 million in police spending over 20 years, while projecting the city will only be able to afford about 40 percent of that.

The city has worked hard to get its creditors to move from opposition to support as it tries to conclude the bankruptcy case, said City Attorney Gary Saenz.