Mortgages that exceed a state ceiling on loans secured by affordable-housing units are void though their underlying debts aren’t, an appeals court said Tuesday, in a precedential ruling applicable to thousands of units.

After two rounds of oral argument, the Appellate Division, in U.S. Bank N.A. v. Hough, A-5623-08, said it was deferring to the amicus New Jersey Housing and Mortgage Finance Agency’s interpretation of the governing state rules, finding it in line with the rules’ purpose — to prevent the loss of affordable housing — and not “plainly unreasonable.”