U.S. consumer spending increased steadily in August, while a measure of underlying inflation remained at the Federal Reserve's 2 percent target for a fourth straight month.

The Commerce Department said on Friday consumer spending, which accounts for more than two-thirds of U.S. economic activity, rose 0.3 percent last month after an unrevised 0.4 percent gain in July. Spending last month was driven by outlays on healthcare, which offset a drop in motor vehicle purchases.

August's increase in consumer spending was in line with economists' expectations.

When adjusted for inflation, consumer spending rose 0.2 percent in August after climbing 0.3 percent in July.

The report came on the heels of data on Thursday showing a decline in orders for key capital goods in August and a further widening of the goods trade deficit, which prompted economists to downgrade their gross domestic product estimates for the third quarter to as low as a 2.8 percent annualized rate.

The economy grew at a 4.2 percent pace in the second quarter, powered by robust consumer spending as well as farmers front-loading soybean exports to China before Beijing's retaliatory tariffs came into effect in early July.

The United States and China are embroiled in an escalating trade war. Economists have warned that the increasingly bitter trade fight could undercut business and consumer spending.

In August, spending on goods increased 0.3 percent, likely lifted by higher gasoline prices. Outlays on services advanced 0.4 percent, with spending on healthcare accounting for much of the increase.

There was a moderation in monthly price gains in August. The personal consumption expenditures (PCE) price index excluding the volatile food and energy components was unchanged after rising 0.2 percent in July.