The US economy grew at a slower pace in 2022, the Commerce Department said Thursday, as activity eased in the final months of the year and recession fears loomed.

Economic activity has been moderating as the US central bank hiked the benchmark lending rate seven times last year, in hopes of cooling demand and reining in costs as inflation surged.

The property sector has slumped, followed by declines in manufacturing and retail sales.

Against this backdrop, the world's biggest economy expanded 2.1 percent for all of 2022, down from the figure in 2021, according to Commerce Department data.

"The increase in real GDP in 2022 primarily reflected increases in consumer spending, exports," and certain forms of investment, said the department in a statement.

In the October to December period, the US saw its gross domestic product rise at an annual rate of 2.9 percent.

This was down as well from 3.2 percent in the third quarter last year, although better than analysts expected.

The latest number marks the second straight quarter of growth after two rounds of contraction.