In an action, inter alia, pursuant to RPAPL article 15 to determine claims to real property, and for a judgment declaring that the plaintiffs are the owners of the subject property and that the defendant has no interest in the subject property, the defendant appeals, as limited by his brief, from stated portions of an order of the Supreme Court, Kings County (Lewis, J.), dated September 30, 2011, which, inter alia, granted those branches of the motion of the plaintiffs Rita DeLuca and Amello Celia which were for summary judgment declaring that they are the owners of the subject property and that the defendant has no interest in the subject property, enjoining the defendant from accessing the subject property or collecting rent from tenants on the subject property, directing the defendant to return to them any rent monies collected for March 2011, and dismissing the counterclaims insofar as asserted against them, and, in effect, denied the defendant’s application for leave to amend his *637answer to include, inter alia, an affirmative defense and counterclaim alleging undue influence.
Ordered that on the Court’s own motion, the notice of appeal from so much of the order as, in effect, denied the defendant’s application for leave to amend his answer is deemed to be an application for leave to appeal from that portion of the order, and leave to appeal from that portion of the order is granted (see CPLR 5701 [c]); and it is further,
Ordered that the order is affirmed insofar as appealed from, and the matter is remitted to the Supreme Court, Kings County, for the entry of a judgment, inter alia, declaring that the plaintiffs Rita DeLuca and Amello Celia own the subject property and that the defendant has no interest in the subject property; and it is further,
Ordered that one bill of costs is awarded to the plaintiffs.
The Supreme Court properly granted that branch of the motion of the plaintiffs Rita DeLuca and Aniello Celia which was for summary judgment declaring that they own a building on Grand Street in Brooklyn (hereinafter the subject property) and that the defendant has no interest in the subject property. The plaintiffs established their prima facie entitlement to judgment as a matter of law by showing that the defendant’s now-deceased wife, Giovanna Pecoraro (hereinafter Giovanna), signed a deed transferring the subject property to them as tenants in common (see Lauriello v Gallotta, 59 AD3d 497, 498 [2009]). The defendant failed to raise a triable issue of fact in opposition. Contrary to his contention, a 1982 agreement between Celia and Giovanna, to which the defendant was not a party, did not convey to him, or entitle him to, any interest in the subject property. In any event, both the merger doctrine (see Ka Foon Lo v Curis, 29 AD3d 525, 526 [2006]) and the six-year statute of limitations for breach of contract (see CPLR 213 [2]) preclude reliance on any defense premised on the 1982 agreement. The defendant’s additional contention, which was based solely on surmise and conjecture, that the deed transfer was the product of undue influence, was not pleaded as an affirmative defense in his answer (see Munson v New York Seed Improvement Coop., 64 NY2d 985, 986-987 [1985]; Rooney v Slomowitz, 11 AD3d 864, 867 [2004]), and, under the circumstances of this case, could not have been anticipated by the plaintiffs (cf. Gulati v Gulati, 60 AD3d 810, 811 [2009]).
The Supreme Court providently exercised its discretion by, in effect, denying the defendant’s application for leave to amend his answer to include, inter alia, an affirmative defense and counterclaim alleging undue influence. “Pursuant to CPLR *6383025 (b), leave to amend a pleading should be freely given, provided that the amendment is not palpably insufficient, does not prejudice or surprise the opposing party, and is not patently devoid of merit” (Rechler Equity B-1, LLC v AKR Corp., 98 AD3d 496, 498 [2012] [internal quotation marks omitted]). Here, the proposed amendments, which were entirely inconsistent with the allegations contained in the defendant’s original answer and counterclaims, surprised the plaintiffs. Moreover, the plaintiffs established that a grant of leave to amend would result in prejudice to them (see Bicounty Brokerage Corp. v Burlington Ins. Co., 88 AD3d 833, 834 [2011]; Dawley v McCumber, 45 AD3d 1399, 1399-1400 [2007]).
The defendant’s remaining contentions are without merit.
The plaintiffs’ contention with respect to ratification, raised for the first time on appeal, is not properly before this Court (see Iqbal v Thai, 83 AD3d 897, 898 [2011]).
Since this is, in part, a declaratory judgment action, the matter must be remitted to the Supreme Court, Kings County, for the entry of a judgment, inter Mia, declaring that the plMntiffs Rita DeLuca and Aniello Celia own the subject property and that the defendant has no interest in the subject property (see Lanza v Wagner, 11 NY2d 317, 334 [1962], appeal dismissed 371 US 74 [1962], cert denied 371 US 901 [1962]). Balkin, J.E, Leventhal, Roman and Miller, JJ., concur.