The Superior Court’s Law Division lacks subject matter jurisdiction to sort out who owns real property in the wake of a foreclosure, an appeals court ruled on Wednesday.

The Appellate Division, in Kanter v. Scharf, A-2977-11, affirmed dismissal of an action seeking a declaratory judgment that the plaintiff, not the person who obtained the foreclosure, owned the property.