Ordered that the order is affirmed insofar as appealed from, with costs.
The parties’ respective rights to the subject properties were fully litigated and finally determined in a previous action (see United States v Schmitt, 999 F Supp 317 [1998], affd 28 Fed Appx 63 [2002]). Under the doctrine of res judicata, a final disposition on the merits bars litigation between the same parties of all other claims arising out of the same transaction or out of the same or related facts, even if based upon a different theory involving materially different elements of proof (see O’Brien v City of Syracuse, 54 NY2d 353, 357-358 [1981]; Sterngass v Soffer, 27 AD3d 549 [2006]; Town of New Windsor v New Windsor Volunteer Ambulance Corps, Inc., 16 AD3d 403, 404-405 [2005]). The rule applies not only to claims litigated but also to claims that could have been raised in the prior litigation (see Matter of Hunter, 4 NY3d 260, 269 [2005]; Hyman v Hillelson, 55 NY2d 624 [1981]; Solow v Liebman, 253 AD2d 808, 809 [1998]).
Accordingly, the Appellate Term correctly determined that, consistent with the holding in United States v Schmitt (999 F Supp 317 [1998], affd 28 Fed Appx 63 [2002]), the petitioner City of New York established its entitlement to judgment as a matter of law awarding it possession of the subject properties and the appellants’ assertion of defenses, which were previously litigated or could have been litigated in the prior action, was insufficient to raise a triable issue of fact. Mastro, J.P., Santucci, Dickerson and Belen, JJ., concur.