When the Great Recession began at the end of 2007, California had $2.5 billion on hand in a trust fund to pay unemployment benefits. Barely a year later, that money was gone — with more than a million jobless Californians still relying on the fund to put food on the table. Only by borrowing billions of dollars from the federal government was the state able to keep paying benefits.

Fast-forward to 2016 and California has regained all the jobs it lost in the recession and added close to a million more. The state’s unemployment rate is below 6 percent, down from a peak of more than 12 percent during the worst of the recession. Fewer Californians are relying on unemployment benefits today than at any time since before the recession began.

California’s unemployment trust fund, however, has made a far less dramatic recovery. More than six years after the recession officially ended, California’s unemployment system is more than $6 billion in debt to the federal government. And California isn’t alone. At least nine other states owe money either to the federal government or to private bondholders. Just 18 states have enough cash to get through a year-long recession, the minimum considered sufficient by the federal government.

That means that a majority of states — including California, New York, Texas and several other big states — are unprepared for a recession. That’s a problem, because although the labor market is strong right now, a growing number of economists are predicting that a downturn, if not imminent, could come sooner rather than later. President Obama has proposed a series of reforms to return state systems to solvency, but few experts think they have much chance of becoming law.

To be clear, all states, even deeply indebted California, will be able to keep paying benefits to unemployed workers. States can borrow unlimited amounts from the federal government to keep payments flowing.

But underfunded unemployment systems can have serious consequences for workers. Several states have responded to depleted trust funds by cutting back either the duration or the amount of benefits available to workers, or both. Several states now offer at most 20 weeks of benefits; traditionally, states have offered at least 26 weeks. Other states could face pressure to follow suit if a recession saps already depleted unemployment resources.

“When states are unprepared and end up needing to borrow from the federal government to pay benefits, it creates conditions where state legislatures then cut benefits,” said Michael Leachman, an analyst at the left-leaning Center on Budget and Policy Priorities who has studied state unemployment programs.

Other states have raised taxes on employers — either voluntarily or automatically in response to a federal mandate — in order to pay off their debts and rebuild their trust funds. That isn’t necessarily a bad thing during good economic times, when a small tax increase isn’t likely to deter companies from hiring workers they need. But if the higher taxes remain in place during a recession, they could discourage hiring at a time when companies are already considering cutting jobs.

“The bigger the debt, the longer it takes to pay off and the higher the taxes, and that hurts job creation,” said Eileen Norcross, who has studied unemployment insurance for the libertarian Mercatus Center. “It’s a signal that you can expect to pay higher taxes in these states.”

Here’s how the system is meant to work: Employers pay state unemployment taxes, which go into a federally administered trust fund. During good economic times, those funds build up, as lots of employers pay in and relatively few workers need benefits. In theory, that fund gets big enough to last during a recession, when revenue falls and unemployment rises. The federal government steps in and provides funding for extended payments during especially bad downturns, when normal benefits aren’t enough.

But federal law gives states significant leeway on both the tax and benefits side of the equation. As a result, states entered the last recession with vast differences in the health of their unemployment trust funds. Some states, such as Washington and Oregon, had large reserves that held up through the recession, despite its severity; those states have also generally rebuilt their funds in the years since the recession ended. Other states, such as South Dakota and New Hampshire, depleted their trust funds during the recession but have since made changes to bring them back to health.

Then there are states like California that entered the recession in bad shape and have emerged from it far worse.

The federal Department of Labor evaluates the health of state unemployment systems using a measure called the “average high-cost multiple,” which is essentially a measure of how long a state’s trust fund would last in a recession. An AHCM of 1 means a fund would last a year, which the government considers the minimum for a fund to be considered “solvent.” California’s AHCM on the eve of the recession was 0.27, and it wasn’t even the worst in the country. Missouri and Ohio had AHCMs of 0.12. New York’s was 0.09. A total of 20 states had AHCMs of less than 0.5; just three of those states have returned to solvency.

Status of state unemployment trust funds STATE TRUST FUND BALANCE ($M) OUTSTANDING DEBT ($M) NET BALANCE ($M) AVERAGE HIGH-COST MULTIPLE** Alabama 445 — 445 0.76 Alaska 448 — 448 1.53 Arizona 102 — 102 0.11 Arkansas 385 — 385 0.71 California 12 6,655 -6,643 — Colorado 681 625* 56 0.05 Connecticut 126 101 25 0.02 Delaware 72 — 72 0.36 Florida 2,666 — 2,666 0.92 Georgia 942 — 942 0.59 Hawaii 475 — 475 1.25 Idaho 459 — 459 1.31 Illinois 1,541 1,470* 71 0.02 Indiana 27 — 27 0.02 Iowa 943 — 943 1.28 Kansas 457 — 457 0.79 Kentucky 4 15 -12 — Louisiana 904 — 904 1.29 Maine 357 — 357 1.11 Maryland 958 — 958 0.79 Massachusetts 926 — 926 0.29 Michigan 2,690 2,917* -227 — Minnesota 1,665 — 1,665 1.10 Mississippi 600 — 600 1.80 Missouri 378 — 378 0.36 Montana 310 — 310 1.59 Nebraska 391 — 391 1.75 Nevada 447 549* -102 — New Hampshire 289 — 289 1.13 New Jersey 1,195 — 1,195 0.34 New Mexico 251 — 251 0.77 New York 288 — 288 0.05 North Carolina 1363 — 1363 0.35 North Dakota 133 — 133 0.77 Ohio 341 773 -432 — Oklahoma 1,153 — 1,153 2.01 Oregon 2,844 — 2,844 1.86 Pennsylvania 967 2,827* -1,861 — Rhode Island 132 — 132 0.26 South Carolina 307 — 307 0.39 South Dakota 99 — 99 1.57 Tennessee 916 — 916 0.88 Texas 1,305 2,670* -1,365 — Utah 946 — 946 1.86 Vermont 231 — 231 1.30 Virginia 770 — 770 0.70 Washington 3874 — 3874 1.37 West Virginia 82 — 82 0.25 Wisconsin 747 — 747 0.44 Wyoming 346 — 346 2.33 * Private debt, as of third quarter 2015; all other debt figures are federal and as of January 2016. ** AHCM can’t be calculated for states with negative trust-fund balances. Source: Department of Labor; U.S. Treasury

Many of the states with the most troubled systems simply don’t raise enough in taxes for their unemployment funds to last through recessions. Arizona, California and Florida, for example, impose unemployment taxes on only the first $7,000 of an employee’s annual wages, the minimum allowed by federal law; several other states set their so-called “wage bases” nearly as low. It’s no coincidence that states with healthy trust funds, such as Washington, Oregon and Idaho, tend to have higher wage bases — Washington’s is $44,000, the country’s highest — and automatically raise them along with inflation.

A handful of states did increase their wage bases in the aftermath of the recession. But state leaders are often reluctant to raise taxes on employers, which they worry could deter hiring. Wayne Vroman, an expert on unemployment insurance at the Urban Institute, said the patchwork of state policies — the result of the way the unemployment system was first put in place under the Social Security Act of 1935 — no longer makes sense, if it ever did.

“The reason we have a state-level system is a historical accident from the 1930s,” Vroman said. “It’s increasingly obvious that in a state-level system, a lot of these states do not step up to the plate.”

In his latest budget, President Obama proposed shifting power away from the states and toward the federal government. He wants to increase the minimum required wage base to $40,000 and index it to inflation, as well as to set a minimum tax rate. He also wants to require states to offer at least 26 weeks of unemployment benefits, among other changes.

Few experts, however, think the proposals will pass a Republican-controlled Congress. And even if Congress does act, shoring up trust fund finances is only one step toward preparing the unemployment system for the next recession. The emergency benefits program, which extends payments beyond the traditional 26 weeks during recessions, is limited and slow to kick in; during the last recession, Congress created a more robust temporary program, but given conservative opposition to extended unemployment benefits, there is no guarantee it would do so again. And as I wrote last year, the unemployment system hasn’t kept up with the changing labor market. For example, contract workers, including Uber drivers and other “gig” workers, aren’t eligible for unemployment insurance at all.

Policymakers and advocates on both the left and right have proposed even more radical changes to the unemployment system. Obama wants to implement a system of “wage insurance” that encourages the unemployed to return to work more quickly by subsidizing their pay if they accept new jobs that pay less than their old ones. Many conservatives want to replace unemployment insurance with a system of individual savings accounts that workers could tap into during periods of joblessness. (Chile has had some success with a version of this approach.)

For the time being, though, states will continue to try to rebuild their trust funds from the recession — and hope that a new one doesn’t hit before they are ready.

CORRECTION (Feb. 4, 12:18 p.m.): A previous version of this story incorrectly tallied the number of states that offer a maximum of 20 weeks of unemployment insurance benefits. At least six states offer the 20-week maximum, not five states. The earlier count omitted Arkansas, which cut its maximum benefit to 20 weeks as of Oct. 1.