California will likely have a $25 billion budget deficit next year, state officials announced Wednesday, ending a run of historic surpluses and acting as a warning to other states about a potential recession.

The deficit will likely lead to some painful spending decisions in the nation’s most populous state. But it likely won’t affect the state’s biggest expansions of government services — including free kindergarten for 4-year-olds and free health care for low-income immigrants living in the country without legal permission.

Revenue has increased steadily in California for the past decade. This year, a $72.4 billion surplus pushed total state spending to more than $300 billion for the first time.

But tax collections have slowed significantly since Democratic Gov. Gavin Newsom signed that budget into law. This year, revenue is $41 billion below expectations, according to an outlook published Wednesday by the nonpartisan Legislative Analyst’s Office.

Democratic-controlled California taxes rich people more than other states, and most of the drop in revenues is because the uber-wealthy aren’t making as much money as they used to. The S&P 500, a key indicator of the health of the stock market that drives the incomes of the super rich, has fallen more than 17% since its peak in January.

“Our revenue estimates represent the weakest performance the state has experienced since the Great Recession,” the LAO report said.

The future looks bleak. Soaring inflation has made everything more expensive. The Federal Reserve has tried to rein in inflation by raising a key interest rate. A higher interest rate makes it more expensive to borrow money, which eventually causes people to spend less. Although that would control price increases, it also cuts demand for goods and services. That leads to layoffs, meaning people pay less in taxes.

“The longer inflation persists and the higher the Federal Reserve increases interest rates in response, the greater the risk to the economy,” the LAO said. “The chances that the Federal Reserve can tame inflation without inducing a recession are narrow.”

Although employment in California remains strong — the 3.9% unemployment rate for September is tied for the lowest since 1976 — the high-wage tech industry has been roiled by a series of recent job cuts. Facebook parent Meta announced last week that it would layoff 11,000 people, or 13% of its workforce.

California’s soaring revenues have fueled a large expansion of government services, including making 4-year-old kindergarten free for everyone and paying for the health care of low-income immigrants who are living in the country without legal permission.

But California is in a much better position to weather a potential recession than it has been in the past. The state has more than $37.2 billion stored in its various savings accounts. And the state has plenty of cash available to meet its obligations this year.

The Legislative Analyst’s Office did not recommend lawmakers cancel ongoing spending on things like the kindergarten or health care expansion. Instead, they have urged lawmakers pull back on some planned one-time spending increases this year. Lawmakers agreed to $75 billion in one-time spending over the past two years.

“To address the budget problem for the upcoming year, these cases might provide the Legislature with areas for pause, delay or reassessment,” the LAO wrote.

Democratic Assembly Speaker Anthony Rendon said Democrats have worked with Newsom to increase the state’s savings accounts over the past few years.

“We can and will protect the progress of recent years’ budgets,” Rendon said. “In particular, the Assembly will protect California’s historic school funding gains, as districts must continue to invest in retaining and recruiting staff to help kids advance and recover from the pandemic.”