The US economy grew at its fastest pace in nearly four years in the second quarter as consumers boosted spending and farmers rushed shipments of soybeans to China to beat retaliatory trade tariffs before they took effect in early July.
US GDP increased at a 4.1% annualised rate also as government spending picked up, the Commerce Department said in its snapshot of second-quarter GDP today.
That was strongest performance since the third quarter of 2014.
The first quarter GDP growth was also revised up to a 2.2% pace from the previously reported 2% rate to account for new source information and methodology improvements.
US output expanded 3.1% in the first half of 2018, putting the economy on track to achieve the Trump administration's target of 3% annual growth.
A measure of domestic demand surged at a 4.3% rate in the second quarter. Ahead of the release, US President Donald Trump and members of his economic team had been promoting the notion that second-quarter growth would be robust.
Earlier in the week he tweeted that the US has "the best financial numbers on the planet."
The second-quarter increase in GDP was in line with economists' expectations.
With today's report the government also published comprehensive revisions to prior GDP data, which did not change the previously presented economic picture.
The US slapped 25% duties on $34 billion worth of Chinese goods effective July 6, provoking a similar response from Beijing, which targeted soybeans and other agricultural products as well as US-made cars.
Trump has also imposed tariffs on steel and aluminium imports, leading to retaliation by the US's main trade partners, including Canada, the European Union, Mexico and China.
There was also a front-loading of exports of other goods in the second quarter.
With the trade-related boost expected to unwind in the second half of the year, economists caution against putting much weight on the April-June quarter growth.
The economy will this year be supported by a $1.5 trillion tax cut package and increased government spending in the last quarter.
But economists have begun to question whether it can continue at this pace in the face of trade tensions and rising rates and the stimulus is expected to fade sometime next year.
Import duties are seen undercutting economic growth, with higher prices for goods discouraging consumer spending and businesses shelving investment plans. Economists in a Reuters poll earlier this week predicted that growth will slow notably from here.
For now, strong growth in the second quarter will keep the Federal Reserve on course to raise interest rates two more times this year. The Fed increased borrowing costs in June for the second time this year and forecast two more rate hikes for 2018.
The GDP report showed the Fed's preferred inflation gauge, the personal consumption expenditures (PCE) price index excluding food and energy, increased at a 2% rate in the second quarter. The core PCE price index rose at a 2.2% pace in the first quarter.
Growth in consumer spending, which accounts for more than two-thirds of US economic activity, increased at a 4% rate in the second quarter, accelerating from the first quarter's pace of 0.5%.
US consumer spending is being driven by the lower taxes and a robust labour market, which created an average of 215,000 jobs a month in the first half of this year.
The front-loading of deliveries of soybean and other goods boosted exports in the second quarter, which grew at their quickest pace since the fourth quarter of 2013, sharply narrowing the US trade deficit.
Trade contributed 1.06 percentage points GDP growth in the second quarter after being neutral in the three months from January to March.
The front-loading of soybean exports, however, depleted farm inventories. As a result, inventories were a drag on GDP growth, subtracting a percentage point after adding 0.27 percentage point in the first quarter.
Business spending on equipment slowed, rising at a 3.9% rate in the second quarter after spending on equipment grew at an 8.5% rate in the first three months of the year.
A further moderation is likely as the trade wars cast a pall on the business spending outlook.
General Motors, Ford and Fiat Chrysler Automobiles this week cut their full-year profit forecasts, citing higher steel and aluminium costs.
Harley-Davidson has also warned that more expensive steel and aluminium and a 25% retaliatory duty imposed by the European Union on shipments from the US could cost the motorbike maker $45-55m this year.
Meanwhile, investment in homebuilding fell for a second quarter in a row, partly due to an acute shortage of houses available for sale reduced brokers' commissions.
US government spending grew at a 2.1% rate, quickening from the first-quarter's 1.5% pace.