WASHINGTON (AP) — Despite high interest rates and chronic inflation, the U.S. economy grew at a 2.9% annual rate from July through September, the government said Wednesday in a healthy upgrade from its initial estimate.

Last quarter’s rise in the U.S. gross domestic product — the economy’s total output of goods and services — followed two straight quarters of contraction. That decline in output had raised fears that the economy might have slipped into a recession in the first half of the year despite a still-robust job market and steady consumer spending.

Since then, though, most signs have pointed to a resilient if slow-moving economy, led by steady hiring, plentiful job openings and low unemployment. Wednesday’s government report showed that the restoration of growth in the July-September period was led by solid gains in exports and consumer spending that was stronger than originally reported.

“Despite higher borrowing costs and prices, household spending – the driver of the economy – appears to be holding, which is a positive development for the near-term outlook,” said Rubeela Farooqi, chief U.S. economist at High Frequency Economics.

It marked the second of three estimates the Commerce Department will provide of economic expansion in the third quarter. In its initial estimate, the department had estimated that the economy grew at a 2.6% annual rate last quarter.

Economists expect the economy to eke out modest 1% annualized growth from October through December, according to a survey of forecasters conducted by the Federal Reserve Bank of Philadelphia. The nation’s manufacturing sector is slowing despite an easing of supply chains that had been backlogged since the economy began rebounding from the pandemic recession two years ago. And inflation is threatening to weaken the crucial holiday shopping period. Retailers say inflation-weary shoppers are shopping cautiously, with many holding out for the most attractive bargains.

But a recession, if likely a mild one, is widely expected in 2023, a consequence of the Federal Reserve’s drive to tame the worst bout of inflation in four decades by aggressively raising interest rates. The Fed has raised its benchmark short-term rate six times this year — including four straight hefty hikes of three-quarters of a percentage point. The central bank is expected to announce an additional half-point hike in its key rate when it next meets in mid-December.

Because the Fed’s benchmark rate influences many consumer and business loans, its series of hikes have made most loans throughout the economy sharply more expensive. That has been particularly true of mortgage rates, which have proved devastating to the U.S. housing market. With mortgage rates having doubled over the past year, housing investment shrank in the July-September period at a 26.8% annual pace, according to Wednesday’s GDP report.

Chair Jerome Powell has stressed that the Fed will do all that it takes to curb the spikes in consumer prices, which shot up 7.7% in October from a year earlier — a slowdown from a year-over-year peak of 9.1% in June but still significantly above the Fed’s 2% target.

Economists had shrugged off the contraction in GDP in the first half of the year because it didn’t reflect any major fundamental weakness in the economy. Instead, it was caused mainly by an influx of imports and by a reduction in companies’ inventories.

In the meantime, the job market has remained surprisingly durable. Employers have added a healthy average of 407,000 jobs a month so far in 2022. And according to a survey by the data firm FactSet, economists predict that the nation gained an additional 200,000 jobs this month. The government will issue the November jobs report on Friday.