A general view of the California State Capital Museum in Sacramento. (Nick Otto for The Washington Post)

In late July, the House passed a bill that would shore up endangered pensions for millions of private-sector retirees and workers in trucking, mining and other blue collar industries, offering loans for insolvent employers so they could make good on their contractual promises. But underfunded state and local government pensions loom as an even bigger problem. Over the past few decades, policymakers from California to Wyoming have made public pension benefits ever more generous — while setting aside too little money to pay for them.

Nearly all the 14 million people who work full time for state and local governments are eligible for traditional pensions, which guarantee a fixed lifetime income for those who have worked for those governments for a certain number of years. To pay for those retirement benefits, governments are supposed to contribute money to their pension funds each year — enough to cover the benefits earned by their employees during that year. But governments have underfunded those pensions by at least $1.28 trillion — and probably much, much more. Current state and local government employees and retirees will almost certainly get their pensions. Public pension benefits are backed by strong legal guarantees and have to be paid even if governments haven’t saved enough money.

But the state and local governments face an enormous problem: Now they are contributing more and more toward pensions each year, both to pay for the more generous benefits and to make up for the accumulated shortfalls. How is this affecting local governments? Here’s what you need to know.

How I did my research

As part of the National Study of Local Government Pension Costs, I collected 12 years of comprehensive annual financial reports, for the years 2005 through 2016, for 442 municipal and county governments across the United States. Instead of focusing on only the largest cities or places with the biggest problems, this database covers a geographically and demographically diverse set of cities and counties spanning all 50 states and Washington, D.C.

From these reports, I determined how much each local government contributed toward its employees’ retirement benefits each year. I then connected those pension expenditure data to U.S. census data on local government employment and finances. Thus, for the 442 local governments included in my sample, I determined how many employees each had, how much general revenue it took in, and how much it spent on various budget items, such as construction and roads. Together, my research shows how local pension expenditures have changed over time and what local governments have done in response.

1. Pension costs vary significantly across local governments

Even in the early years I studied, cities and counties contributed very different amounts toward their pension funds each year. That’s not just because large cities like Dallas and San Francisco have a lot more employees than smaller places like Ulysses, Kan. Even when I look at local pension contributions per active employee or as a percentage of general revenue, there is wide variation. A small subset of local governments have pension costs much higher than the rest of the pack. In 2007, for example, the median local government I studied contributed $4,901 toward pensions per full-time equivalent employee and 3.1 percent of its general revenue. About 15 percent of the governments spent roughly double that or more.

Larger, wealthier and more urban cities and counties spend more per employee on pensions. So do those in states with stronger public-sector unions and collective bargaining for public employees. None of this is surprising. After all, government salaries tend to be higher in places with collective bargaining, and promised pension benefits are based on employees’ salaries. Even before the Great Recession, cities and counties were spending very different amounts on pensions.

2. Local pension costs are on the rise and not just in union-friendly blue states

In the past decade, local government pension contributions have risen just about everywhere: red states, blue states, states where unions are strong and weak. Nearly 90 percent of the cities and counties I studied saw their pension contributions grow between 2005 and 2016, adjusting for inflation. In three-quarters of the cities and counties, pension expenditures grew as a share of general revenue.

But again, that growth varies remarkably across local governments. Recall that the median local government spent $4,901 per employee and 3.1 percent of general revenue on pensions in 2007. Between 2007 and 2016, pension contributions in the median local government increased by $1,216 per employee and consumed an additional 0.7 percent of revenue. In the top 15 percent of the cities and counties, however, that grew by a whopping $5,314 per employee and consumed about 3 percent more general revenue. In places like San Jose and Joliet, Ill., pension expenditures by 2016 were well over 10 percent of general revenue.

The takeaway? Local pension costs have increased almost everywhere. In some places, the increases have been modest; in others, significant.

3. Governments are cutting jobs, not increasing revenue, to shore up pensions

Most local governments are not responding by increasing revenue — e.g., raising fees or taxes. Instead, they typically try to make ends meet by cutting local government staffing.

On average, a city where pension costs doubled over that decade responded by cutting full-time equivalent employment per capita by 6.4 percent. In a city of 100,000 people, that’s typically a loss of about 65 city employees. Those staffing cuts are more pronounced in places with strong unions and collective bargaining. And governments are cutting an array of municipal and county workers, including police, firefighters, and sanitation employees.

Why would they do this? The main business of local government is providing services. Personnel costs make up a large share of the typical local budget. Raising taxes is politically difficult. For local officials needing to make room for rising pension costs, personnel costs are a natural place to look.

Out of the public eye, public-sector pension expenditures are quietly and persistently eating into local government budgets. As a result, local government workforces in many places are shrinking. This doesn’t just mean fewer government jobs to go around. It means that all those who rely on local government services are in danger of losing those supports. Many Americans take for granted that their local governments will provide public services like police protection, fire protection, street sweeping and refuse collection. But it may well become harder for local governments to carry out those basic functions — because of rising pension costs.

Don’t miss anything! Sign up to get TMC’s smart analysis in your inbox, three days a week.

Sarah Anzia is the Michelle J. Schwartz Associate Professor of Public Policy and Political Science at the University of California at Berkeley.