Mayor Rahm Emanuel closed the books on 2017 with $155.5 million in cash on hand, up just $2 million from the year before, but the pension crisis that has triggered a $2 billion avalanche of tax increases got better, a city audit showed Wednesday.

Chicago’s general obligation debt backed by property taxes now stands at nearly $9.9 billion — roughly $3,680 for each of the city’s 2.7 million residents.

That’s up from $9.46 billion last year, thanks in part to the mayor’s plan to isolate sales tax revenue in a special fund and use it to refinance $3 billion in city debt.

In December, the city issued $743.7 million of those bonds at interest rates ranging from 2.59-to-5.0 percent.

Emanuel is counting on that new financing structure to generate about $94 million in savings both this year and in 2019.

The “securitization” structure dramatically reduces borrowing costs, because bondholders get paid first, even if the worst happens and the city goes bankrupt.

Only after debt service is paid would sales tax revenue start to flow back to the city.

Emanuel has identified dedicated funding sources for all four city employee pension funds after overriding a series of vetoes by Gov. Bruce Rauner.

Chicago taxpayers have paid a heavy price, already enduring $1.2 billion in property taxes for police, fire and teacher pensions; a 29.5 percent tax on water and sewer bills for the Municipal Employees Pension Fund, the largest of the four; and a pair of telephone tax increases for the Laborer’s pension fund.

More tax increases are on the way. By the city’s own estimates, police and fire pension costs will rise by $297.3 million, or 36 percent, in 2020. The Municipal and Laborer’s plan costs will grow by $330.4 million, or 50 percent, in 2022. Emanuel has not said how he plans to close those gaps.

The comprehensive annual financial report by the accounting firm of Deloitte & Touche LLP shows the progress the city has made to chip away at the pension crisis.

Chief Financial Officer Carole Brown said the city’s total pension debt now stands at $28 billion, down from $31 billion a year ago, thanks to the state legislation.

The Laborers Pension Fund improved the most. It now has $1.3 billion in debt and assets to cover 48.1 percent of its liabilities. That’s up from just 31.6 percent a year ago.

The Municipal Employees Pension Fund was next. It now has $11.7 billion in debt and assets to cover 27.9 percent of liabilities — up from just 19 percent a year ago.

The liability of the police pension fund increased slightly, to $10.3 billion. Its funding ratio stands at 23.2 percent, up from 21.8 percent a year ago.

Same for the firefighters pension fund. Its liability rose by $500 million, to $4.6 billion. It now has assets to cover just 19.6 percent of its liabilities, down from 19.8 percent a year ago.

Still, Brown said the overall picture is improving.

“The city has not only identified permanent, recurring revenue to fund its pensions. Once again, we lived within our means and used recurring revenues to balance our budget and we ended the year with a positive fund balance,” Brown said.

“The financial statements are free of any material weaknesses or deficiencies. Things are improving.”

Under repeated questioning, Brown refused to say how Emanuel — if he is re-elected, that is — would meet the city’s pension obligation when the five-year ramp to actuarial funding is over.

“One of the things that Mayor Emanuel was very key on was that we had to improve the overall financial health of the city so that we could address the upcoming obligations of the city, not from a point of crisis, but from a point of planning,” Brown said.

“That’s why we spent all this time coming up with recurring revenue to support the city’s expenses. That’s why [the city has] worked to pull over $600 million of expense out of our operating budget. It’s why we are doing a much better job of collecting revenue, all with an eye to the future obligations we’re going to have to meet.”

Water and sewer fund revenues were both down slightly because of a decrease in revenue tied to the “continued conversion from non-metered to metered accounts,” the audit shows.

Higher landing fees, terminal rental rates and increased concession revenues tied to a new concession management contract drove up total operating revenues at Midway Airport by $12.8 million, or 7 percent.

It was the same story at O’Hare, even before an $8.7 billion expansion project.

Revenues there were rose by $28.3 million, or 3 percent, also due to “increases in concession revenues, parking revenues due to a new rate structure implemented in January, 2017 and rents.”

Airline leases needed to bankroll the $8.7 billion O’Hare Airport expansion project include even higher rents and landing fees.