In spite of the shortfall, Mr. Amelio and the system’s board quietly decreed in mid-December that “excess” earnings on investments in 2010 entitled retirees to an unexpected cost-of-living increase of as much as 3.5 percent this year. The special $170 million bonus is in excess of regular cost-of-living adjustments, or COLAs.

“The irony of issuing bonus payments to retirees at a time the pension fund is a billion dollars down is insane. It really is,” said Jeff Adachi, San Francisco’s public defender and the chief proponent of Proposition B, which he says would have saved the city $120 million this year. “It’s like a bankrupt corporation paying dividends to its shareholders.”

Until 2005, the city paid nothing into the pension fund because the fund had more assets than long-term liabilities and the excess investment income more than covered its expenses. During those flush years, the benefits were made increasingly generous, especially to the police and fire departments. But the system has posted investment losses for 4 of the last 10 years.

The city is required to inject cash if necessary to pay its retirees. This year, it will pay $325 million, or 13.6 percent of the total payroll of $2.4 billion. In the coming fiscal year, it will pay 18.1 percent  about $434 million. Three years from now, according to the actuarial report, the city will be paying 28.8 percent of payroll, or about $691 million.

The city’s estimated budget shortfall for the coming fiscal year is $360 million. If not for its growing pension-fund contributions, the city might not face a budget crisis at all.