In an action, inter alia, to foreclose a mortgage on real property, the defendants appeal from a judgment of the Supreme Court, Dutchess County (Jiudice, J.), dated March 11, 1991, which granted the plaintiff’s motion for summary judgment and dismissed their counterclaims.
Ordered that the judgment is affirmed, with costs.
By decision and order dated April 2, 1990, this Court modified the Supreme Court’s judgment of foreclosure and sale to reinstate the defendants’ six counterclaims, which had *540been dismissed sua sponte at the conclusion of the nonjury trial of the foreclosure action. We did so because the record did not make clear on what basis the dismissal had been made and, moreover, because the sua sponte nature of that dismissal had precluded the defendants from offering proof in support of those counterclaims (First Natl. Bank v J. & J. Milano, 160 AD2d 670). Following the determination by this Court, the plaintiff moved for summary judgment, which the Supreme Court granted.
In First Natl. Bank v J. & J. Milano (supra), this Court did not direct a trial on the counterclaims, and thus the plaintiff was not precluded from making a motion for summary judgment, which may, as a matter of course, include a prayer for relief based on legal grounds cognizable under CPLR 3211 (a) (see, CPLR 3212; Siegel, NY Prac § 283 [2d ed]). Although the motion was based on the existing record, the defendants were afforded the opportunity which had not been given to them earlier, to advance whatever proof they had to defeat dismissal.
It is well-established that the proponent of a motion for summary judgment must make a prima facie showing of entitlement to judgment as a matter of law by tendering sufficient evidence to eliminate any material issues of fact from the case (see, Winegrad v New York Univ. Med. Ctr., 64 NY2d 851, 853; Zuckerman v City of New York, 49 NY2d 557, 562; Sillman v Twentieth Century-Fox Film Corp., 3 NY2d 395, 404). However, if the movant does so, the burden shifts to the party opposing the motion, who must submit evidence which creates material issues of fact requiring a trial (see, Zuckerman v City of New York, supra). In this case the plaintiff advanced, inter alia, a finding made by the Supreme Court on the trial of the foreclosure action that a certain release of the mortgage, covering a portion of the property on which the defendants had hoped to build a nursing home, was withheld from the defendants because they had breached their promise to deposit certain moneys with the plaintiff. This promise was the consideration for the issuance of the release. We find that the alleged wrongful withholding of the release was the key fact underlying each of the counterclaims. The defendants were bound by the finding made by the Supreme Court at the trial of the foreclosure action that the plaintiff was justified in acting as it did with regard to the release. Although they were not given an opportunity to litigate the counterclaims as such, they were given a full and fair opportunity to litigate that issue; indeed, it was advanced as an *541affirmative defense to the foreclosure action. The defendants thus were collaterally estopped from relitigating the issue (see, Kaufman v Lilly & Co., 65 NY2d 449, 455-456; Ryan v New York Tel. Co., 62 NY2d 494, 501). Accordingly, the plaintiff made a prima facie showing of entitlement to judgment as a matter of law with respect to the counterclaims (see, CPLR 3211 [a] [5]; 3212). Upon remittitur, no new proof was advanced in opposition to the motion for summary judgment and in support of any of the counterclaims. Thus, summary judgment was properly granted (see, Zuckerman v City of New York, supra). Bracken, J. P., Balletta, O’Brien and Copertino, JJ., concur.