Government leaders in Richmond, Annapolis and the District are wrestling with a side effect of the coronavirus pandemic that they did not anticipate: excess revenue.

Virginia expects a budget surplus of at least $500 million at the end of this fiscal year, and Maryland and D.C. are looking at smaller but significant bumps in finances.

The windfalls are the last thing fiscal planners expected a year ago, when the region’s biggest jurisdictions were mired in terrifying projections of budget shortfalls and a cratering economy because of shutdowns and job losses related to the pandemic.

But massive federal stimulus spending helped states cover the costs of addressing the coronavirus and its impact on society, then turbocharged a surprisingly quick economic turnaround, leading to surges in tax revenue. Now, billions in aid from the federal American Rescue Plan Act are about to land in state and municipal coffers, providing unprecedented extra resources.

“I don’t think anybody thought that the upside would be anything like this,” said Aubrey Layne, secretary of finance for Virginia Gov. Ralph Northam.

“If you’re looking at just the numbers, it’s like covid never occurred. It’s remarkable,” said Andrew M. Schaufele, director of Maryland’s Bureau of Revenue Estimates.

The flip side is that thousands of jobs lost during the pandemic have yet to return, and many individuals — especially those in lower income brackets — continue to suffer financially. Evictions that had been postponed during the worst of the public emergency are once again a looming threat. The economic boom has been driven by big corporations and the wealthy, who benefited as stocks stayed strong and assets such as real estate zoomed to new heights of value, according to regional finance experts.

While every Republican in Congress voted against the $1.9 trillion American Rescue Plan, it has proved popular nationally among governors and lawmakers of both major parties because of its support for individuals, businesses and infrastructure projects. Maryland Gov. Larry Hogan (R) has joined Northam and D.C. Mayor Muriel E. Bowser, both Democrats, in praising the relief program.

Virginia’s economy has rebounded with particular strength. Layne told lawmakers this week that the state performed “extraordinarily well” in revenue collections in April, with proceeds from income, sales and corporate taxes up almost 42 percent from the year before, an unprecedented jump.

State revenue is running $2.65 billion ahead of last year and $1.7 billion ahead of forecasts, Layne said.

Last year, he had warned Northam and lawmakers of the potential for a $2 billion shortfall because the state’s economy was brought to a standstill by the pandemic. The General Assembly had just passed a historically generous budget. Lawmakers had to come back to Richmond for a special session to freeze all new spending and propose cuts in the event that revenue did not return.

That austere budget was largely restored to full levels during the General Assembly’s regular session this year. Then this week, Layne told lawmakers that he expects to end the fiscal year Sept. 30 with a surplus of $500 million — or more.

“We’re very fortunate,” Layne said, crediting both the rebounding state economy and the effects of federal stimulus money.

As prices of commodities and real estate have gone up during the recovery, that has boosted state revenue from sales and real estate taxes, he said. Surges in stock prices have led to big jumps in non-withholding tax revenue. And as the coronavirus vaccines lead to society opening up, people are spending more on services instead of just goods, further boosting tax revenue.

The General Assembly will return to Richmond sometime this summer for another special session, this time to allocate federal relief money. Layne urged lawmakers to consider any extra funds as a once-in-a-lifetime chance to help solve long-standing problems, such as the opioid addiction crisis and a statewide shortage of mental health treatment facilities.

All told, Virginia has received or is slated to receive about $26.5 billion in federal aid to state and local governments, Layne said — an amount roughly equivalent to the state’s general fund. The total includes money from last year’s Cares Act and upcoming deposits of about $7.2 billion from the American Rescue Plan.

In addition to that relief, individuals and businesses have received or will soon get a total of nearly $51 billion in federal stimulus money, he said: “All together, that’s about $77 billion flowing through the economy.”

At the same time, about 182,000 of the 440,000 jobs Virginia lost during the pandemic downturn have not been replaced, Layne said. Most of them are in lower-wage service industries, he said.

In Maryland, the state lost 400,000 jobs during the pandemic, but the doomsday scenario that analysts also feared never materialized. Schaufele, director of the Bureau of Revenue Estimates, said the picture is rosier than anyone could have predicted.

“We knew [covid-19] was going to directly impact the service industry and retail, but we thought that it would spread out to other industries, which is what happens in most recessions,” Schaufele said. But those sectors remained resilient.

Last May, analysts predicted Maryland would lose at least $925 million in state revenue by the end of June. In July, the Board of Public Works cut $413 million from the state’s budget, slashing funding to universities, community colleges, crime initiatives and dozens of other state programs.

The next step would have been layoffs for state workers. But by late September, analysts said Maryland had enough cash to avert the cuts. They cited federal stimulus spending, expanded unemployment benefits and job losses concentrated in lower-
paying industries with helping to keep money circulating in the economy.

By last month, the turnaround was complete. The General Assembly passed a record $52.4 billion state budget that included bonuses for state workers and money for education restructuring. Schaufele said projections now call for a $161 million surplus over expectations for next year’s revenue.

He credited robust tax collections, which he said are growing as if the pandemic never happened. That’s all at the upper end, however. Low-wage jobs have still not recovered, Schaufele said, but they account for just 6.1 percent of Maryland’s income tax revenue.

Schaufele said this week that Maryland is expected to receive $55 billion to $60 billion in total from federal stimulus spending, about $10 billion more than was estimated in March. The amount is equivalent to about 11 percent of the state’s entire economy and similar to the revenue generated by the state’s largest industry — professional and business services, which includes attorneys, architects and engineers.

“It’s like we created another industry in our state. The amount of money is staggering,” Schaufele said.

Analysts said the ability of the federal government to move quickly on the recovery package and businesses making adjustments during the pandemic to continue operations helped to minimize the economic toll covid-19 could have had on the state economy.

“They actually got the money out the door,” Schaufele said of the stimulus checks from the federal government. “It stemmed the tide. If that money had leaked out slowly, the recession would have leaked out and impacted other sectors, almost certainly.”

The District’s financial outlook has improved since earlier this year, as well, and is expected to rebound to pre-pandemic levels by fiscal 2022, D.C.’s interim chief financial officer, Fitzroy Lee, said in revenue projections published Friday. Lee credited improved business tax collections, a boost in the stock market and federal aid.

The city’s revenue for fiscal 2021 is expected to be about $8.1 billion, a $125.3 million increase from February, according to estimates sent to Bowser and D.C. Council Chairman Phil Mendelson (D). In February, the city projected a $235 million deficit between 2021 and 2024; new estimates predict a $65 million surplus during this period.

Lee said the American Rescue Plan boosted the city’s economic outlook by injecting federal dollars into public health and rental assistance programs. In all, D.C. expects to get about $3.2 billion in federal relief, with more than two-thirds of that already received.

Bowser, who is expected to submit her proposed fiscal 2022 budget to the council late next week, said Monday that her outlook is positive. “This is going to be an important budget for how we come back from covid,” she said.

But Lee also wrote that moratoriums on certain types of payments such as utility bills, put in place because of the pandemic, could hurt the recovery when they end, if they push residents deeper into financial turmoil. He said rental and utility relief programs being offered to residents now should help mitigate this problem.

Lower income from hotels, apartments and office properties is also expected to be a drag on revenue growth in the coming years, as businesses weigh whether workers need to be in the office at all.

“As the pandemic recedes, the long-lasting effects will become more apparent,” Lee wrote.