The US economy shrank in the first three months of the year as government spending fell and imports surged due to firms racing to get goods into the country ahead of tariffs.

The economy contracted at an annual rate of 0.3%, a sharp downturn after growth of 2.4% in the previous quarter, the Commerce Department said.

The figures marked the first quarterly decline in three years, and came as the introduction of import taxes by President Donald Trump has scrambled global trade and created major uncertainty.

But analysts said it would take more time to understand the impact of the tariff changes.

While imports count against growth in calculations of gross domestic product (GDP), the surge is expected to be reversed in the months ahead. Those swings do not necessarily indicate an economy performing poorly.

The report also showed consumer spending - the primary driver of the US economy - expanded 1.8%, though at a slower pace than in 2024.

This report tracked activity through the end of March, a period before Trump announced his most far-reaching "Liberation Day" tariffs on China and other countries around the world, which sparked a dramatic sell-off in the stock market and turmoil in currency and debt markets.

It showed imports skyrocketed by more than 40% in the first three months of the year, while consumer spending grew 1.8%, down from 4% at the end of 2024.

Analysts cautioned that those figures could be distorted by people pulling forward their purchases in anticipation of tariffs.

The report also showed an unexpected jump in business investment, while final sales to private domestic purchasers - a closely watched indicator of overall demand - grew a solid 3%, little changed from the previous quarter.