US economic growth slowed in the second quarter as imports widened the trade deficit, but robust consumer spending and business investment related to the buildout of artificial intelligence infrastructure underscored strong domestic demand.The moderation reported by the Commerce Department in its snapshot of gross domestic product on Thursday also reflected continued inventory drawdown to meet the strong demand as well as the reduction of the Strategic Petroleum Reserve, which weighed on federal government expenditures.

The report suggested the economy weathered the initial oil price shock from the Middle East conflict, though renewed hostilities between the United States and Iran posed a downside risk to growth in the second half of the year.

Generous tax refunds this year from President Donald Trump's "One Big Beautiful Bill," which helped to fuel consumer spending last quarter, are behind, leaving households without much of a cushion as average gasoline prices rise back above US$4 a gallon.

Income growth has cooled in tandem with a stable labor market, increasing moderately in June, and the saving rate is at a four-year low of 2.7 percent, adding to the economy's growing vulnerabilities, economists said. Consumers have been dipping into savings and saving less to maintain spending.