The number of homes for sale fell to its lowest level in at least five years in October, dropping by 17% from one year ago and 34% from two years ago, according to a report released Wednesday.

Fewer than 1.76 million homes were listed for sale last month, down by 2.6% from September, according to Realtor.com, a listings website. Compared with one year ago, listings fell in all but five of 146 markets.

Inventories have been falling for more than a year, first as investor demand surged and later, as traditional buyers, have returned to more markets. Meanwhile, banks have slowed down their foreclosure processes in many states, and many homeowners have taken their homes off the market.

Declining inventories have helped set the stage for price increases in many parts of the country, particularly hard hit regions that saw prices plunge from 2006 through 2011 amid supply-demand imbalances.

Listings are still down sharply from one year ago in many California markets, with declines of 65% in Stockton, 63% in Sacramento, 59% in Oakland, 44% in San Jose, and 42% in Riverside.

But listings have begun to rise from September’s levels in more markets, particularly in those that have seen huge declines over the past year. Inventories were up by more than 5% in Phoenix and Tucson, Ariz., and by more than 3% in the Florida cities of Naples, Punta Gorda, and Fort Myers-Cape Coral.

Median asking prices were unchanged from one year ago and down slightly from September, which is typical for this time of the year. Around one third of markets saw declines in asking prices, led by Peoria, Ill. (down 11.5%), and Charleston, W.Va. (down 9.7%). The largest gains were reported in Sacramento (up 31%), Santa Barbara, Calif. (up 27%), and Phoenix (up 26%).

The Realtor.com figures include sale listings from more than 900 multiple-listing services across the country. They don’t encompass all homes for sale, such as those that are “for sale by owner” and other properties that aren’t marketed through multiple-listing services.