BANK runs, with depositors queuing round the block to get their cash, are a familiar occurrence in history. A run on a pension fund is virtually unprecedented. But that is what is happening in Dallas, where policemen and firefighters are pulling money out of their city’s chronically underfunded plan, and Mike Rawlings, the mayor, is suing to stop them.

At the start of the year the fire and police pension fund had $2.8bn in assets. Since then nearly $600m has been withdrawn from the plan, of which almost $500m has been taken out since August 13th. That is an alarming acceleration; in 2015 total withdrawals were just $81m.

Even at the start of 2016, the plan was just 45% funded, and was expected to become insolvent within 15 years. When some workers take out their money, they get the full value of their benefits; leaving a smaller pot to be shared among the remaining members. (The city estimates that the funded ratio has fallen to 36% after the withdrawals.) As in a bank run, it seems rational to withdraw your money if you worry that all the benefits won’t be paid.

The crisis is the result of three linked issues: overgenerous pension promises; the flawed nature of public-sector pension accounting in America; and some bad investment decisions. In order to pay the generous benefits, the scheme counted on an investment return of 8.5% a year, absurdly high in a world where the yield on ten-year Treasury bonds has been hovering in a range of 1.5-3%. So the scheme opted for riskier assets in private equity and property. But the strategy did not work; the value of its investments declined by $263m in 2014 and $396m in 2015, thanks largely to write-downs of those risky assets.

It is not unusual for state and local-government pension schemes in America to be underfunded; the average scheme was 73.6% funded at the end of 2015, according to the Centre for Retirement Research at Boston College. A more conservative accounting approach, as is required of private-sector pension plans, would bring the ratio down further, to 45%.

But the Dallas fund has a particularly big problem. It operates a deferred-retirement option plan (DROP) which allows police and firemen who have qualified for retirement to keep working, while their benefits are kept in a separate account earning an interest rate that has been 8-10% a year. More than 500 Dallas DROP accounts are worth more than $1m; the average account is worth nearly $600,000.

In addition, since 1989, retirement benefits have been upgraded using an annual cost-of-living adjustment of 4%. The city estimates that benefits are now 15-20% higher than they would have been had they been upgraded in line with the consumer-price index. Together, the DROP plan and cost-of-living increases make up around half of the scheme’s total liabilities.

There are only two possible solutions to the shortfall: put more money into the fund or cut the benefits. A 1984 referendum limits the maximum amount of city contributions—a limit that the city has reached this year. The 2015 scheme report suggested that total annual contributions to the pension fund would need nearly to double, from 37.6% to 72.7% of payroll, in order to close the deficit, and even that would take 40 years. The pension scheme has asked that the city make a one-off payment of $1.1bn in 2018, which the city says would require it to more than double property taxes. Both Fitch and Moody’s, two ratings agencies, downgraded Dallas bonds in October, citing the pension issue.

Instead, the city has proposed a plan that involves rolling back some of the accrued cost-of-living increases and interest payments on the DROP accounts. But Sam Friar, the pension board’s chairman, has called the proposal a “non-starter”; any attempt to reduce past benefits will almost certainly end up in the courts. As The Economist went to press, Mr Rawlings’s suit was on hold while the pension fund’s board was to consider whether to block withdrawals itself. But that would be a short-term solution to a crisis that has been building for decades and that is not confined to Dallas alone.