In this Tuesday, May 16, 2017, photo, Marshalls tags are attached to merchandise in a store in Methuen, Mass. On Friday, Oct. 13, 2017, the Commerce Department releases U.S. retail sales data for September. (AP Photo/Elise Amendola)

WASHINGTON (AP) — Americans increased their spending at retailers last month by the most in two and a half years, driven by strong auto sales as residents of hurricane-ravaged areas replaced destroyed cars.

Auto sales jumped 3.6 percent, the most since March 2015. Gas sales climbed 5.8 percent, the most in four and a half years, reflecting price spikes after Hurricanes Harvey and Irma. The storms damaged oil refineries and pushed up gas prices 13 percent last month.

Even excluding the volatile auto and gas categories, sales rose a solid 0.5 percent, up from a 0.1 percent gain in August.

Neil Saunders, managing director of Global DataRetail, said that many analysts worried higher gas prices would lead Americans to spend less elsewhere.

“This did not materialize, and consumers used modest gains in wages … to carry on buying,” Saunders said.

Americans are optimistic about the economic outlook. A measure of consumer sentiment released Friday by the University of Michigan rose to its highest level since 2004. The U.S. unemployment rate has hit a 16-year low, and wages have ticked up in recent months. That should boost spending and broader economic growth in the coming months.

Most of the gains last month were likely fueled by Hurricanes Harvey and Irma, which slammed into Texas, Florida and other southeastern states in late August and September.

Sales at home and garden supply stores rose 2.1 percent, probably lifted by hurricane preparation, as well as repairs and renovations in the aftermath of the storms. Grocery store sales increased 0.8 percent, the most since April 2016, likely boosted by restocking after the hurricanes hit.

Sales at general merchandise stores, which include big box retailers such as Walmart and Target, rose 0.3 percent.

Online retailers reported another healthy gain of 0.5 percent. E-commerce sales have jumped 9.2 percent in the past year, more than double the overall sales increase of 4.4 percent.

Not all stores saw a boost: Sales at furnishers, electronics and appliance stores, and sporting goods stores fell.

The retail sales report is closely watched because it provides an early read on consumer activity each month. Consumer spending accounts for about 70 percent of the economy.

U.S. economic growth likely slowed in the July-September quarter as the hurricanes shut down thousands of businesses, people were forced to miss work, and power was cut to millions of homes. Analysts forecast that the economy expanded at a 2 percent annual pace in the third quarter, down from a 3 percent gain in the April-June quarter.

Yet the economy is expected to rebound in the final three months of the year as rebuilding and repair work accelerates. Construction and engineering firms are expected to step up hiring as homes, commercial buildings and roads and bridges are fixed. Economists expect growth will pick up to a 2.5 percent to 3 percent pace.

Copyright 2017 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.