PHOENIX — The right of state lawmakers to allow homeowners to post “for sale’’ signs trumps any deed restrictions that ban them, the Arizona Court of Appeals has ruled.

In a unanimous ruling Tuesday, the judges rebuffed arguments by a planned community that its pre-existing ban on such signs remains valid despite a 2009 law to the contrary.

Potentially more significant, the appellate judges rejected the contention that the 2009 law unconstitutionally interfered with the contracts previously signed by all property owners agreeing to the restriction.

Judge Peter Swann, writing for the court, said there may be situations in which the ability of legislators to overturn existing covenants, conditions and restrictions — CC&Rs, as they are known in the business — is limited.

But he said statutes are presumed constitutional and the burden is on the homeowners association to prove otherwise.

The case involves Robert and Cecilia Hawk, who purchased a lot in Pine Canyon, a Flagstaff master-planned community managed by PC Village Association. That lot, along with all the others, is subject to CC&Rs originally recorded in 2002 and amended two years later.

One section of the restrictions prohibits the display of any sign visible from neighboring property without approval of the Village Association or the Design Review Committee.

In 2011, on two consecutive days, the Hawks posted a “for sale’’ sign on their lot. After the association forced its removal, the Hawks sued to have the restriction declared unenforceable.

When a trial judge sided with the couple, the association appealed.

Swann said the intent of lawmakers was quite clear: They wanted to void any existing CC&R provisions that prohibit “for sale’’ signs.

He noted the law specifically says signs that meet certain size requirements are permitted. And it also says the statute applies to any restriction “without regard to the date the covenant, restriction or condition was created, signed or recorded.’’

As to the constitutional claim by the association, Swann said it is up to the group challenging the law to show that it “substantially impairs’’ the contractual arrangement. Even then, the judge said, a challenger must also show there is no “significant or legitimate public purpose” behind the law, or that the impairment is an “unreasonable means’’ of achieving that purpose.

The appellate judges were no more impressed by affidavits by other Pine Valley residents who said they considered “for sale’’ signs to be eyesores and expected to be able to enjoy their properties without such signs. Swann said the trial judge was correct in ruling that the 2009 law “should be no surprise to the association or other property owners.’’

Tuesday’s ruling was cheered by Michelle Lind, chief executive officer of the Arizona Association of Realtors, who had filed legal briefs in the case on behalf of the couple.

Lind acknowledged the lawsuit forced the court to balance the rights of the Hawks with that of the other homeowners who bought their property with the assumption there would be no such signs.

“On this issue, AAR really supports provisions that assist property owners in selling their homes, which is likely their greatest capital asset, the biggest financial investment people make,’’ Lind said.