In an action to recover damages for, inter alia, breach of contract, plaintiffs appeal from a judgment of the Supreme Court, Rockland County (Cerrato, J.), entered October 5, 1982, which granted defendant’s motion for summary judgment and dismissed the complaint. Judgment affirmed, with costs. Under the doctrine of res judicata, plaintiffs’ present claims are barred by the prior determinations of Justices Wood and Slifkin (see O’Brien v City of Syracuse, 54 NY2d 353, 357; Smith v Russell Sage Coll., 54 NY2d 185, 191-193; cf. Spindell v Brooklyn Jewish Hosp., 35 AD2d 962, 963, affd 29 NY2d 888). Although the answer raised this defense only in relation to the prior determination by Justice Wood, this was because the determination by Justice Slifkin occurred after the answer in this action had been served. As a defendant can be granted summary judgment on an unpleaded defense where, as here, the prerequisites are met (Rogoffv San Juan Racing Assn., 54 NY2d 883, 885; Barrett v Kasco Constr. Co., 56 NY2d 830, 831), Special Term properly granted the motion. In light of this determination, we need not reach the other issues raised by the parties. Titone, J. P., O’Connor, Weinstein and Rubin, JJ., concur.