Tucson and Phoenix were in the top 10 nationally in 2012 for profit made on "flipping" single-family houses, a foreclosure research firm said Thursday.

RealtyTrac, of Irvine, Calif., said in a press release that "flipped" sales - those six months or less after purchase - were third most profitable in Phoenix, at 44 percent gross profit, and 10th most profitable in Tucson, at 34 percent.

The top market for flipping a house was Orlando, Fla., at 63 percent gross profit.

In Phoenix, 10,589 single-family houses were bought and then sold again within six months last year, and in Tucson, 1,071 such transactions occurred, RealtyTrac reported.

The average purchase price in Phoenix was $146,528, and the average sale price was $210,290. In Tucson, the average purchase price was $117,338, and the average sale price was $156,685, RealtyTrac said.

The company noted that in Phoenix and Tucson, and in the other markets with high profit on flipped sales, housing prices are climbing rapidly. Phoenix home prices were up an estimated 33 percent last year, and Tucson's were up an estimated 16 percent.

"Flipping homes ... will likely become more favorable for investors in 2013 as home prices are expected to continue climbing," the company's press release said.