The U.S. economy grew by 5.7% in 2021, the most since 1984, in the latest indication that the nation has been able to weather the economic storm caused by the pandemic.

The GDP increase in the fourth quarter, in particular, exceeded expectations. Economists polled by The Wall Street Journal were anticipating a 5.5% bump, but data from the Commerce Department released Thursday showed 6.9% growth. Accelerated consumer spending and increased inventories drove the positive outcome.

“However,” Bloomberg reports, “other economic data suggest that strength was concentrated at the start of the fourth quarter, as Americans pulled forward their holiday shopping to navigate shipping delays and a surge in Covid-19 cases curbed demand for services late in the year. Figures Wednesday showed a surge in retail and wholesaler stockpiles in December, which may reflect imports that arrived too late for holiday shoppers and the omicron-related dip in activity.”

The Associated Press adds:

Squeezed by inflation and still gripped by COVID-19 caseloads, the economy is expected to slow this year. Many economists have been downgrading their forecasts for the current January-March quarter, reflecting the impact of the omicron variant. For all of 2022, the International Monetary Fund has forecast that the the nation’s GDP growth will slow to 4%.

Many U.S. businesses, especially restaurants, bars, hotels and entertainment venues, remain under pressure from the omicron variant, which has kept millions of people hunkered down at home to avoid crowds. Consumer spending, the primary driver of the economy, may be further held back this year by the loss of government aid to households, which nurtured activity in 2020 and 2021 but has mainly expired.

“The path of the economy continues to depend on the course of the virus,” the The Federal Reserve said in a written statement on Wednesday. “Progress on vaccinations and an easing of supply constraints are expected to support continued gains in economic activity and employment as well as a reduction in inflation. Risks to the economic outlook remain, including from new variants of the virus.”

The central bank indicated that it would raise interest rates this year, likely starting in March, in a bid to fight inflation.