Economic growth slowed less than expected in the second quarter as a surge in consumer spending blunted some of the drag from declining exports.

The fairly upbeat report from the Commerce Department will probably not deter the Federal Reserve from cutting interest rates next Wednesday for the first time in a decade, given rising risks to the economy's outlook, especially from a trade war between the United States and China.

Despite the better-than-expected GDP reading, business investment contracted for the first time since early 2016 and housing contracted for a sixth straight quarter. Fed Chairman Jerome Powell early this month flagged business investment and housing as areas of weakness in the economy.

But the signs of robust consumer spending, together with a strong labor market, further diminish expectations of a 50 basis point rate cut and could raise doubts about further monetary policy easing this year.

Gross domestic product increased at a 2.1 percent annualized rate in the second quarter, the government said. The economy grew at an unrevised 3.1 percent pace in the January-March quarter.

Economists polled by Reuters had forecast GDP increasing at a 1.8 percent rate in the second quarter.

The economy is slowing largely as the stimulus from the White House's $1.5 trillion tax cut package fades. The tax cuts together with more government spending and deregulation were part of measures adopted by the Trump administration to boost annual economic growth to 3.0% on a sustained basis.

The economy grew 2.9 percent in 2018 and growth this year is expected to be around 2.5 percent. Economists estimate the speed at which the economy can grow over a long period without igniting inflation at between 1.7 percent and 2.0 percent.

The GDP report showed a pickup in inflation last quarter. A gauge of inflation tracked by the Fed increased at a 1.8 percent rate last quarter, just below the central bank's 2 percent target.

The government also published revisions to GDP data from 2014 through 2018. The updated data showed growth in the second and third quarters of last year was not as robust as previously estimated, and the economy grew much more slowly in the fourth quarter than had been reported in March. Revised price data showed moderate inflation last year.

Growth in consumer spending, which accounts for more than two-thirds of U.S. economic activity, surged at 4.3 percent rate in the second quarter, the fastest since the fourth quarter of 2017. Consumer spending grew at a 1.1 percent rate in the first quarter.

Some of the slowdown in consumer spending early in the year was blamed on a 35-day partial shutdown of the government. Spending is being supported by the lowest unemployment rate in nearly 50 years, which is lifting wages.

The jump in consumer spending helped to offset some of the weakness from exports, which fell at a 5.2 percent rate last quarter, in a reversal of the strong growth experienced in the first quarter.

The plunge in exports caused a deterioration of the trade deficit. As result, trade subtracted 0.65 percentage point from GDP growth last quarter after contributing 0.73 percentage point in the January-March period.

The acceleration in consumer spending also helped businesses to whittle down an inventory overhang, leading to a smaller inventory build.

Inventory investment increased at a $71.7 billion rate, slowing from the first quarter's $116.0 billion pace of increase. While inventories cut 0.86 percentage point from GDP growth in the second quarter, the smaller pace of stock accumulation is a potential boost to manufacturing.

Businesses have been placing fewer orders with factories while working through stockpiles of unsold goods, which contributed to undercutting manufacturing production. Inventories added 0.53 percentage point to GDP growth in the first quarter.

Business investment fell at 0.6 percent rate in the second quarter, the first contraction since the first quarter of 2016. It was pulled down by a 10.6 percent pace of decline in spending on structures, which includes oil and gas well drilling.

Spending on intellectual products, including research and development, increased. Business spending on equipment rebounded at a 0.7 percent rate in the second quarter, constrained by design problems at aerospace giant Boeing.

Growth in government investment accelerated, but spending on homebuilding contracted for a sixth straight quarter.