The average foreclosed home sold during the quarter took 193 days to sell. That was up from 172 days in the previous quarter and 161 days in the third quarter of 2010.

NEW YORK (CNNMoney) -- Sales of homes in foreclosure comprised 20% of all U.S. residential sales during the third quarter, according to RealtyTrac.

That share is a significant decline from the same period in 2010, when foreclosed homes made up 30% of residential sales, but it's still a far cry from levels seen during healthier housing markets when foreclosures comprised less than 5% of sales.

In total, 221,536 distressed properties were purchased during the quarter, down 11% from the previous quarter and 5% lower than the same quarter a year earlier, RealtyTrac said.

One reason for the year-over-year decline is that fewer homes are making it through the foreclosure pipeline, said Daren Blomquist, a spokesman for RealtyTrac.

Banks have slowed the processing and sale of foreclosures as they attempt to make sure they are not mishandling paperwork or attesting to facts that they have no knowledge of, both actions that were exposed during the robo-signing scandal.

"The number of REOs (bank-owned properties) coming onto the market has been artificially limited because of processing issues," he said. "That has reduced supplies."

As a result of these delays, the average foreclosed home sold during the quarter took 193 days to sell. That was up from 172 days in the previous quarter and 161 days in the third quarter of 2010.

Banks have also refrained from selling some distressed properties in order to avoid flooding the market with "for sale" signs that will weigh further on home prices.

"There's a healthy demand for these homes: People see them as buying opportunities. But banks are not listing them as quickly as they could," said Blomquist.

For buyers and investors, there are indeed bargains to be found. On average, REOs sell for 42% less than conventional sales nationwide.

The smallest discounts are generally in places hardest hit by foreclosures. In those markets, so many of the sales are foreclosures that anyone selling a home has to price it very competitively, said Blomquist.

In Nevada, where foreclosure-related sales accounted for 57% of all residential sales during the third quarter, repossessed homes sold for only 20% less than conventional ones.