U.S. retail sales rose 0.4% in August on faster movement in autos and parts, but otherwise consumers unexpectedly tightened their wallets in the wake of Amazon.com's (AMZN) - Get Report  Prime Day sale the prior month, and as stock markets declined due to President Donald Trump's intensifying trade war with China.

Retail sales excluding autos were unchanged during the month, slowing from July's Amazon-hypercharged 1% pace, the U.S. Census Bureau said in a statement. Economists surveyed by FactSet had projected an increase of 0.2%, on average. 

Bank of America economists wrote in a report earlier this week that the spending drop-off in August was partly due to Amazon's Prime Day in July, which "effectively pulled forward demand," leaving customers with less spending power the following month. 

Per Census data through July, retail sales had risen every month this year except for February.

Declining consumer optimism also may have played a role in the spending cutback, according to the Bank of America economists.

A slew of recent surveys have shown that Trump's intensifying trade war with China has sapped confidence among consumers, business executives and investors alike, largely due to fears that an escalation of the dispute could cause damage to a global economy that's already slowing. 

Economists monitor retail sales closely, since consumer expenditures account for about 70% of U.S. gross domestic product.