The coronavirus is pounding state governments with a financial one-two punch, costing them millions to try to contain the disease just as businesses are shutting down and tax revenue is collapsing. The sharp drop in revenue could jeopardize some states’ ability to provide basic services.

States ranging from tiny Rhode Island to California, with the world’s fifth-largest economy, have warned that many programs are likely to face cuts or even elimination.

“I am gravely concerned about our ability to deliver basic services over the next six months to a year given the drop in revenues, and that’s why I am encouraging the Legislature to be extremely fiscally prudent,” Oregon Gov. Kate Brown, a Democrat, said about building the budget for the coming fiscal year.

“I’m telling you, these numbers don’t work.”

Many states are blowing through the multi-billion dollar rainy day funds they built up after the end of the Great Recession. Without that cushion, government finance experts say, states would have been in much worse shape.

Virginia expects to take a hit of up to $2 billion. The result: Lawmakers may rescind the 2% annual raises just promised to teachers.

Christine Melendez, a high school Spanish teacher in Chesterfield County, said losing the raises would be a “slap in the face” to teachers who have endured years of stagnant pay. Like teachers across the country, they are improvising online lesson plans after schools were shuttered.

Melendez predicted there would be fierce pushback if teacher pay is not improved.

“We can only take so much,” she said.

States will get help from the $2.2 trillion stimulus passed by Congress this week and signed Friday by President Donald Trump. State, local and Native American tribal governments are in line for $150 billion in direct aid to combat the virus and could get more through other parts of the legislation.

How far that will go is unclear as the outbreak grows more severe in many states and shutdown measures are all but certain to be extended.

New York Gov. Andrew Cuomo, a Democrat, ripped the GOP-led Senate’s version of the coronavirus package as “terrible” for New York and said, based on preliminary reports, that it would send the state some $4 billion in direct aid. A Tax Foundation estimate shows the state government in line for nearly twice that much.

New York, which has become the epicenter of the coronavirus fight in the U.S., could see revenue drop by $15 billion, or about 8%, in the coming fiscal year, budget officials said. Another $12 billion that was expected to arrive soon will be delayed for months because the state, like others, is extending the tax filing deadline from April to July.

“The response to this virus has probably already cost us $1 billion. It will probably cost several billion dollars when we’re done,” Cuomo said. “I’m telling you, these numbers don’t work.”

The gloomy financial outlook is a sudden and stark turnaround after years in which a strong economy sent streams of cash into state coffers. Governors and lawmakers across the country had plans for that money: teacher raises, pre-K expansions, Medicaid for immigrants who are in the country illegally.

Those wish lists are now looking more like pipe dreams.

California has a $20 billion reserve but also relies heavily on capital gains, which swell the budget when the stock market is soaring. Gov. Gavin Newsom this week warned agency heads that a drop in economic activity would put their ambitions for new or expanded programs on hold.

In Ohio, Gov. Mike DeWine announced freezes on state-government hiring and new contract services. He also told cabinet members to look for immediate budget cuts of up to 20%.

Only a month ago, Minnesota officials said the surplus for the fiscal year that goes through June would be $1.5 billion — $200 million more than previously expected. Now Gov. Tim Walz says most of the surplus would be set aside to deal with uncertainties brought by the virus.

New Jersey announced this week that it would keep $920 million it had planned to spend between now and June to ensure cash flow. That’s more than 2% of the state’s current spending plan, but officials are warning that the budget impact could be deeper than that.

In Tennessee, Gov. Bill Lee is now basing his budget plan for the fiscal year that starts July 1 on having an economy with no growth. Previously, he anticipated a growth rate of 3%.

Arkansas Gov. Asa Hutchinson said the outbreak is projected to cause a drop of $353 million in state revenue through June. That represents about 6% of the state’s general fund budget.

The U.S. has at least 100,000 confirmed infections of the new coronavirus, the most of any country. Across the globe, the virus has claimed at least 26,000 lives. Health authorities have said most people experience mild or moderate symptoms, such as fever and cough that clear up in two to three weeks. For some, especially older adults and people with existing health problems, it can be fatal; younger adults also have succumbed to the disease.

Governors across the country have warned that the number of cases in their states is expected to spike in the coming weeks. While their shelter-in-place or shutdown orders have varied, schools and a wide array of businesses remain closed, dramatically reducing consumer spending and, in turn, government tax revenue.

Some states are being hit especially hard, including those that rely on tourism.

The Nevada Resort Association says taxes on tourism have paid for about 38% of the state’s general fund budget in recent years. The governor there has frozen state hiring and limited government purchases.

Rhode Island loses about $1 million in state revenue for each day its two casinos are closed. Gov. Gina Raimondo is warning that the virus’ widening economic fallout could lead to government layoffs in a state that already was facing a $200 million shortfall. Rhode Island lawmakers also approved borrowing up to $300 million to help the state cover its bills.

“Furloughs and layoffs are things you want to avoid at all costs,” Raimondo said. “They were considered in the last recession, but it all depends on how quick we get the economy back on track and how robust the federal government response is.”

Mulvihill reported from Cherry Hill, New Jersey. Associated Press writers Christina A. Cassidy in Atlanta; Andrew DeMillo in Little Rock, Arkansas; Melinda Deslatte in Baton Rouge, Louisiana; Gillian Flaccus in Portland, Oregon; Steve Karnowski in Minneapolis; Morgan Lee in Santa Fe, New Mexico; Philip Marcelo in Boston; Michelle Price in Las Vegas; Alan Suderman in Richmond, Virginia; Marina Villeneuve in Albany, New York; and Andrew Welsh Huggins in Columbus, Ohio, contributed to this report.