Arizona's home foreclosure picture continued to improve in August, but was still ranked fourth worst in the nation, a monthly report said Thursday.

RealtyTrac, a foreclosure tracking and marketing company based in Irvine, Calif., said in its monthly report that the state had 7,899 foreclosure filings. That is 28.7 percent lower than one year ago and 3.9 percent lower than ion July.

A foreclosure filing is defined as a default notice, a foreclosure notice or a bank repossession, and one property could have more than one filing on it over time.

Arizona has been ranked second worst in the country for most of the last five years, and was ranked worst in the nation one month earlier this year.

August filings in the state represented one for every 360 residential properties. That compared with one in every 298 for Illinois, the worst-ranked state, and one in every 681 nationally. The national rate was up slightly from July, 0.8 percent, and down 15.2 percent from August 2011.