Confidence among U.S. homebuilders is swelling to a five-year high, with many now anticipating that sales of new homes will strengthen this year even as signs point to a slowing economy.

The National Association of Home Builders/Wells Fargo builder sentiment index surged six points this month to 35, the highest reading since March 2007.

It rose from a reading of 29 last month, marking the largest one-month gain in nearly a decade.

The index, released Tuesday, has declined only once between January and July. Still, any reading below 50 indicates negative sentiment about the housing market.

In July, builders say they observed the best sales levels since February 2007. Their outlook for sales in the next six months also brightened to the highest level since March 2007.