WASHINGTON — Americans stepped up their spending on cars, restaurant meals, groceries and clothing in August, suggesting that consumers will help sustain U.S. economic growth despite a broader global slowdown.

The Commerce Department said Tuesday that retail sales rose 0.2 percent last month, after advancing 0.7 percent in July. Sales have increased 2.2 percent over the past 12 months, as solid hiring has translated into surges in spending at auto dealers and dining establishments.

“There was more spending on ‘wants’ last month” such as eating out, sporting goods and electronics, said Jennifer Lee, a senior economist at BMO Capital Markets. “These are areas that suggest consumers are ready and willing to splurge a little on items outside of the basic necessities.”

Retail sales have been fed this year by solid and steady job gains. The hiring — 2.9 million additional jobs over the past 12 months — has translated into a surge of spending at auto dealers and restaurants. The U.S. economy has become increasingly reliant on consumer spending to maintain growth as Europe and China have struggled to expand at a faster pace.

Carmakers are on pace to top vehicle sales of 17 million for the first time since 2001. Nearly a fifth of all retail sales tracked by the government come from the auto industry. Sales at dealerships and parts stores have risen 5.7 percent during the past 12 months, as many Americans are replacing their older vehicles. Auto retailers reported a 0.7 percent increase in August.

The healing job market also has Americans getting out of their own dining rooms more frequently, which has been a boon for restaurants that had suffered in the wake of the recessions as people watched every dime.

Purchases at restaurants and bars increased 0.7 percent in August and have soared 8.2 percent this year. And dining establishments have added more than 372,000 workers over the past year to satiate the new businesses.

Sales also improved last month at grocers, clothiers, sporting goods stores, electronics outlets and online retailers.

Still, retail sales growth has been much more modest. This largely stems from gasoline being dramatically cheaper, causing purchases at service stations to plummet 17.2 percent since August 2014.

Consumers have mostly pocketed the savings, instead of shifting their spending elsewhere as gas costs averaged $2.33 a gallon nationwide — a 31.5 percent drop over the past year, according to AAA.

In August, spending at gasoline stations slid 1.8 percent in August.

The retail sales report also indicated a possible pullback in the housing sector’s momentum, as purchases at furnishers and building supply stores fell in August after gains over the past 12 months.

Economists watch the retail sales report closely because it provides the first indication each month of the willingness of Americans to spend. Consumer spending drives 70 percent of the economy. Yet retail sales account for only about one-third of spending, with services such as haircuts and Internet access making up the other two-thirds.