
    Ellsworth Goldstein et al., Appellants, v David S. Haberman, Respondent.
   — In an action to recover damages for professional malpractice, the plaintiffs appeal from an order of the Supreme Court, Nassau County (Robbins, J.), dated June 28, 1990, which granted the defendant’s motion to dismiss the complaint.

Ordered that the order is reversed, on the law, with costs, the motion is denied, and the complaint is reinstated.

The defendant moved pursuant to CPLR 3211 (a) (5) to dismiss the plaintiffs’ complaint on the ground that the cause of action may not be maintained because of the applicable Statute of Limitations. In his reply affirmation the defendant first raised the argument that the complaint should also be dismissed for failure to state a cause of action (CPLR 3211 [a] [7]). In accordance with the notice of motion’s general prayer for relief, the court granted the defendant’s motion to dismiss the complaint on the ground that it failed to state a cause of action (CPLR 3211 [a] [7]). Inasmuch as the motion to dismiss was not predicated upon a claimed failure to state a cause of action, the plaintiffs were never afforded an opportunity to seek leave to plead again under CPLR 3211 (e), and that deprivation worked substantial prejudice to them (McLearn v Cowen & Co., 60 NY2d 686, 689; see also, Mitchell v Mendez, 107 AD2d 737). Accordingly, it was error to grant the motion to dismiss on the alternative ground.

We have reviewed the parties’ remaining contentions and find them to be without merit. Bracken, J. P., Lawrence, Eiber and Santucci, JJ., concur.  