The U.S. economy unexpectedly shrank last quarter, the first contraction since 2020, as a ballooning trade deficit and softer inventory growth belied an otherwise solid consumer and business demand picture.

Gross domestic product fell at a 1.4% annualized rate after a 6.9% pace of growth at the end of 2021, the Commerce Department's preliminary estimate showed Thursday. The median forecast in a Bloomberg survey of economists was for a 1% increase.

Together, net exports and inventories subtracted about 4 percentage points from headline growth. Government spending shrank, also weighing on GDP.

Still, real final sales to domestic purchasers, a measure of underlying demand that strips out the trade and inventories components, increased an annualized 2.6%, an improvement from the 1.7% pace in the fourth quarter.

On its face, the headline GDP figure was decidedly soft. But underlying details show still-solid household demand and business investment, corroborating comments about the economy from company executives during the current string of earnings calls.

Against a backdrop of quicker inflation, the figures will likely keep Federal Reserve monetary policy geared for a half-point hike in interest rates next week. Nonetheless, Fed officials need to balance that policy tightening with risks associated with building price pressures.

Critics of President Joe Biden, whose poll numbers have sunk, may also seize on the GDP figures to indicate his policies aren't working.

Ten-year Treasury yields reversed an earlier decline, while stock futures and the dollar held onto gains.

The Commerce Department's data showed personal consumption, the biggest part of the economy, rose an annualized 2.7% in the first quarter, compared with 2.5% at the end of 2021. Services spending added 1.86 percentage points to GDP, while goods spending stagnated, reflecting changing consumer behavior.

At the start of this year, spending surged as COVID-19 cases declined. As the quarter dragged on, high inflation began to take a bite out of purchasing power. Nonetheless, many corporate executives on recent earnings calls touted the durability of the American consumer.

Looking forward, rapid inflation and dwindling fiscal support point to more moderate growth in outlays for the remainder of the year. Furthermore, higher interest rates may at some point prompt companies to trim capital expenditures budgets.

Other potential headwinds for the U.S. economy include knock-on effects from Russia's war in Ukraine that include deteriorating growth prospects in Europe, raw-materials shortages and persistent supply-chain hiccups. Trade flows are also at risk from the Chinese government's severe pandemic-related lockdown measures that have stymied activity at some of the nation's ports.

Last quarter, inflation-adjusted business investment increased an annualized 9.2%, the firmest in a year and reflecting stronger equipment spending and intellectual property, according to the GDP report.

Residential investment rose at a 2.1% pace, as builders began making some headway on backlogged projects. While underlying housing demand remains strong, a rapid rise in mortgage rates and record-high home prices are weighing on affordability and could begin weighing on homebuilding later this year.

The report showed trade subtracted 3.2 percentage points from GDP in the first quarter, reflecting a surge in imports and a drop in exports. The U.S. economy has recovered more quickly from than pandemic than many countries abroad, bolstering demand for foreign-made goods.

The change in inventories subtracted 0.84 percentage point from the headline figure during the January-March period. In the fourth quarter, they added a whopping 5.3 points. Looking ahead, businesses will continue to replenish their inventories in an effort to restock following the robust merchandise demand seen in 2021.

The personal consumption expenditures price index excluding food and energy, an inflation measure followed closely by Fed officials, grew an annualized 5.2% last quarter. Monthly PCE data for April will be released on Friday.

Olivia Rockeman reports for Bloomberg News.

Copyright 2022 Bloomberg. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.