BOSTON — A decade after the collapse of investment bank Lehman Brothers and the financial crisis it triggered, analysts say only 20 states are well-positioned to handle the first-year shock of a recession with their reserves — and Massachusetts is not one of them.

A report from S&P Global Ratings this week placed Massachusetts at an "elevated risk" of financial distress during a hypothetical recession, one of 15 states that analysts said are the most poorly situated in the event of a new and prolonged downturn in the economy.

"Widening federal budget deficits and a still-low federal funds rate imply that the economic and fiscal brunt of the next recession is likely to fall more squarely on the states," S&P analysts wrote, adding that state economies "could be challenged as never before by the next recession."

To assess a state's ability to respond to a recession, S&P considered a "moderate" recession in which the states experience a cumulative budget shortfall of $71.1 billion or 9.9 percent of revenues, and a "severe" shortfall of $84.7 billion or 11.8 percent, both exceeding the 8.1 percent year-over-year tax revenue decline between 2008 and 2009.

Massachusetts could expect to experience a 10 percent revenue shortfall under S&P's moderate scenario and a 13 percent shortfall under the severe scenario. The state's reserve fund could cover 62 percent of the shock of the first year of a moderate recession and 50 percent in a severe recession, S&P said.

The state's reserves as of Aug. 1 stood at $1.3 billion, according to the state's early August information statement. But House Speaker Robert DeLeo said this week that a $400 million deposit into the reserve fund this budget cycle meant the fund balance was "approaching something like $2 billion." When Gov. Charlie Baker signed the newest state budget in July, his budget office estimated that fiscal 2018 would end with an estimated $1.78 billion in reserves.

"Unfortunately, things aren't always going to be as rosy as they may be at this present time," DeLeo said Monday night during an appearance on WBZ-AM. "You always have to be prepared, be prepared in terms of a possible recessionary period."

In order to manage through the hypothetical recession, S&P said Massachusetts and other similarly-positioned states would have to make "fiscal adjustments that go beyond drawing from accumulated budget reserves alone."

Though the credit rating agency warned many states are not prepared for a recession, it also said a recession is not likely to hit states in the next year.

"With GDP growth accelerating through mid-2018, S&P Global Ratings estimates the odds of a recession occurring during the next 12 months are even lower, in the range of 10% to 15%. Similarly, throughout 2018 state fiscal health has stabilized and strengthened," the agency said.

DeLeo said he was "very excited" that the rainy day fund balance was growing.

"Not only is it a good sign of good fiscal management, it's also again important should we hit a time when those funds may be necessary to take care of the most neediest amongst us," he said on Monday.

In June 2017, S&P Global Ratings lowered its rating for Massachusetts bonds to AA from AA+ and admonished the state for its approach to savings.

"The downgrade reflects what we view as the commonwealth's failure to follow through on rebuilding its reserves as stipulated through its own fiscal policies aimed at mitigating the state's propensity for revenue volatility," S&P Global Ratings credit analyst John Sugden said at the time.

Michael P. Norton contributed reporting.