U.S. healthcare spending skyrocketed in 2020 as the federal government invested significantly in response to the COVID-19 pandemic, according to new data from the Centers for Medicare & Medicaid Services (CMS).

CMS’ Office of the Actuary released its annual report on health expenditures, which found spending increased by 9.7% in 2020 to reach $4.2 trillion. By comparison, spending grew by 4.3% in 2019.

Much of this growth was backed by significant federal spending in response to COVID; such expenditures grew by 36% in 2020, according to the report published in Health Affairs. Healthcare also surged as a portion of the economy last year, representing 19.7%.

At the same time, gross domestic product decreased by 2.2% in 2020, according to the report.

“The year 2020 will always be remembered for the dramatic impact that COVID-19 had on nearly every aspect of life, including the heath care sector and the overall economy,” the actuaries wrote.

The spike in federal healthcare spending was not directly related to patient care, according to the report. Instead, it was linked to helping providers financially weather the pandemic, helping states bolster their Medicaid programs and investing in public health activity.

With that funding excluded, national health expenditures increased by just 1.9%.

Out-of-pocket spending on healthcare declined in 2020 in tandem, according to the report, by 3.7%. In 2019, out-of-pocket spending increased by 4.4%. The analysts attribute that decline to decreased use of healthcare services as well as prescription drugs over the course of the year.

The actuaries said they lack full data to paint a picture of the pandemic’s impact on expenditures in 2021, but that there will likely be “widespread notable effects” included in their next report. In addition, they said that recent developments in the pandemic, such as the spread of the new omicron variant, are likely to extend the pandemic’s impacts into 2022.

“Uncertainty remains regarding how the pandemic may evolve during the winter months,” the actuaries said. “We do know, however, that the story that unfolded in 2020 and continues today is unlike anything that has happened in the past 100 years.”