Arizona home sales volume tapered off in 2013 as demand greatly exceeded supply, driving prices but pushing down the number of sales across the state, a real estate data company reported Thursday.

Home sales in the state totaled 160,081 for the year, based on an annualized projection from monthly figures, RealtyTrac Inc. reported. The Irvine, Calif., company said that was a 13 percent decline in volume from 2012.

The median sales price in the state was $167,500, up 19 percent from a year earlier, RealtyTrac reported.

It estimated that 21.7 percent of the homes sold in Arizona were under some phase of foreclosure. The "distressed discount" price for the sale of a home in foreclosure or facing foreclosure was 22 percent, meaning the sale price was that much less than for a non-distressed sale.

In the Phoenix metro area, the median sales price was $178,000 for all residential properties, up 23 percent from 2012, while in Tucson, it was $145,000, up 8 percent, RealtyTrac reported.

Phoenix area sales volume was down 17 percent for the year, the company estimated, while in Tucson, sales volume was off by 3 percent.

Nationally, sales volume for the yeasr was estimated to be 10 percent higher than in 2012, with 5.2 million units sold, RealtyTrac's report said. The national median sales price was $168,391, up 2 percent from a year earlier.