U.S. retail sales rose by the most in six months in May, a sign that confident consumers are leading a strong economic rebound after a slow start to the year.

Yet with high gas prices and inflation eating away at income gains made by workers, Americans may not be able to maintain this level of spending.

Retail sales jumped 0.8 percent last month, the Commerce Department said Thursday, the largest increase since November. Excluding the volatile gas and auto categories, sales rose 0.8 percent. April's sales growth was revised higher, from 0.2 percent to 0.4 percent.

Americans are highly confident about the economy, buoyed by steady job gains, an unemployment rate at an 18-year low, and the Trump administration's tax cuts. The solid job gains have meant more Americans are earning paychecks, and spending them.

Healthier consumer spending has boosted the economy after a sluggish first quarter. Analysts forecast growth is likely to reach 4 percent in the April-June quarter, up from 2.2 percent in the first three months of the year.

"The consumer is on fire," Stephen Stanley, chief economist at Amherst Pierpont Securities. "The combination of lower taxes and a drum-tight labor market are producing very solid growth in disposable income."

Sales at home and garden stores jumped 2.4 percent, the most in eight months, and rose 2 percent at gas stations. Both partly reflect higher prices, particularly gas sales, though home and garden stores are likely seeing higher prices for lumber and other building materials, partly because of strong demand for new housing.

Despite rising gas prices, Americans spent more at restaurants and bars, as well as at clothing stores, with sales rising 1.3 percent for both. Department store sales increased 1.5 percent.

Americans may not be able to maintain that spending pace. Inflation, led by pricier fuel, has picked up, leaving most Americans with paychecks that, adjusted for inflation, haven't increased in the past year.

Many have dipped into savings. The U.S. saving rate slipped to 3.1 percent in the first three months of the year, down from 3.9 percent a year earlier and 4.9 percent in 2016.

And shoppers are still exhibiting some caution — consumer borrowing growth fell to its slowest pace in seven months in April, mostly because a category that includes auto and student loans increased more slowly. If they remain reluctant to borrow more, that could also slow spending.

The Federal Reserve lifted interest rates for the second time this year Wednesday, which will raise credit card interest rates and may boost mortgage rates in the coming months.

Still, Fed Chair Jerome Powell said the decision to raise rates reflected the Fed's judgment that the economy is in "great shape."

Retail sales are closely watched by economists because they provide an early read on consumer spending, the principal driver of the U.S. economy. Store purchases account for about one-third of U.S. consumer spending. Spending on services, such as landscaping and mobile phones plans, makes up the remaining two-thirds.