PHOENIX - Housing advocates are asking the Arizona Court of Appeals to overturn a lower court ruling allowing the Legislature to take $50 million from the state's share of a nationwide mortgage settlement.

Attorney Tim Hogan said Maricopa County Superior Court Judge Mark Brain erred earlier this month when he said there is nothing illegal about the move.

Hogan wants the appellate judges to not only overrule Brain but to do it quickly: Absent a court order, the funds will be transferred at December's end.

"Once the money's transferred into the general fund, it's gone," Hogan said, adding, "These homeowners need the money now. And even assuming we could get it back through a regular appeal, it would be several years from now."

The dispute stems from an agreement by five major lenders earlier this year to settle allegations of mortgage fraud. The total settlement is $26 billion; Arizona's share is about $1.6 billion.

The biggest chunk of Arizona's share - $1.3 billion - is earmarked to directly help homeowners who are "underwater" on their mortgages, owing more than the property is worth.

The settlement also includes another $110 million for those who lost their homes in foreclosure between 2008 and the end of 2011 due to lender misconduct. There also is $85 million available for interest rate reductions for some consumers.

And the state itself got $97 million.

In taking more than half of that to balance the budget, legislative leaders said the state itself is a victim of the mortgage foreclosure crisis, which sent property values into a tailspin and reduced state tax collections.

Hogan, representing housing advocacy groups and some potential individual beneficiaries of the funds, said that's not what the deal was designed to do.

"This mortgage settlement money is supposed to benefit homeowners," he said. "Just by dumping it in to the general fund it doesn't do that."

Brain disagreed, saying lawmakers have the ultimate power to decide how all funds that are given to the state are spent.

Attorney General Tom Horne, who signed the nationwide agreement on behalf of Arizona, initially urged lawmakers not to take the money. But he eventually acceded to their demands.