In an action, inter alia, to enjoin defendants from violating their occupancy agreement with plaintiff, defendants appeal from so much of an order and judgment (one paper) of the Supreme Court, Kings County, dated October 24, 1977, as, upon denying their motion pursuant to CPLR 3211 to dismiss the complaint, granted summary judgment to plaintiff. Order and judgment modified, on the law, by deleting the first decretal paragraph thereof. As so modified, order and judgment affirmed insofar as appealed from, without costs or disbursements. Defendants’ time to answer is extended until 20 days after entry of the order to be made hereon. Special Term, pursuant to CPLR 3211 (subd [c]), decided to treat defendants-appellants’ motion to dismiss the complaint under CPLR 3211 (subd [a], pars 2, 7), which was made prior to the service of their answer, as a motion for summary judgment. The court then granted summary judgment against defendants. However, it does not appear from this record that defendants were given adequate notice of Special Term’s intention to treat the motion as one for summary judgment. Such notice is required and the failure to give it necessitates the reversal of the order and judgment insofar as it has been appealed from (see Rovello v Orofino Realty Co., 40 NY2d 633; Mareno v Kibbe, 32 AD2d 825), even though it may well be that defendants have no defense on the merits (cf. Luna Park Housing Corp. v Besser, 38 AD2d 713; Brigham Park Coop. Apts. Section No. 2 v Krauss, 21 NY2d 941; Linden Hill No. 2 Coop, v Leskowitz, 41 AD2d 741, affd 34 NY2d 580; Kings Bay Houses, Section Two v Malkis, 50 AD2d 860). Damiani, J. P., Suozzi, Rabin and Shapiro, JJ., concur.