WASHINGTON — Consumers are giving a modest lift to the economy. They spent more on trucks, electronics and building supplies in October to boost retail sales for the fifth straight month.

The gains provide an encouraging start for the October-December quarter. They come just as separate reports show that wholesale prices are flattening.

Still, consumers might not be able to sustain their spending growth if unemployment remains high and pay raises scant. And Europe may be on the brink of a recession that could further slow U.S. growth next year.

“The consumer has to come through this holiday season if we are going to get back to more decent growth rates, and the early readings are those households have hit the stores quite strongly,” said Joel Naroff, chief economist at Naroff Economic Advisors.

Retail sales rose 0.5 percent from September to October, the Commerce Department said Tuesday. Healthy auto sales helped. Excluding autos and sales at gas stations, sales rose 0.7 percent, also the biggest increase since March.

A rebound in consumer spending was the key reason the economy grew at an annual rate of 2.5 percent from July to September. It was the best quarterly performance in a year.

Economists said the October retail sales data suggest that the economy is growing at roughly the same pace in the final three months of the year. Consumer spending fuels about 70 percent of economic activity.

Stronger growth has helped calm fears that the U.S. economy might be at risk of another recession.