— In a medical malpractice action, defendants appeal from an order of the Supreme Court, Kings County (Dowd, J.), dated February 4, 1982, which granted plaintiffs’ motion, inter alia, (1) to strike from the answer of the *584defendant City of New York the affirmative defense of failure to timely serve a notice of claim and to timely commence the action, and (2) for leave to serve a summons and verified complaint upon defendant New York City Health and Hospitals Corporation. Order reversed, on the law, without costs or disbursements, plaintiffs’ motion is denied and the complaint against the defendant City of New York is dismissed. Accrual of the female plaintiff’s malpractice claim occurred on October 13, 1978, when the tubal ligation operation was performed, and not on May 3, 1979, when it was determined that she had become pregnant (see Merced v New York City Health & Hosps. Corp., 44 NY2d 398,414-415; McKnight v New York City Health & Hosps. Corp., 70 AD2d 587). Thus, the service of a notice of claim on the defendant City of New York on July 30, 1979 and on the defendant New York City Health and Hospitals Corporation on July 26, 1979, was untimely (see General Municipal Law, §§ 50-e, 50-i; New York City Health and Hospitals Corporation Act, § 20 [L 1969, ch 1016, as amd]; Brennan v City of New York, 59 NY2d 791). Furthermore, the time limited to apply for leave to serve a late notice of claim has expired (see Pierson v City of New York, 56 NY2d 950). A motion to dismiss an affirmative defense pursuant to CPLR 3211 (subd [b]) searches the record and puts the legal sufficiency of the complaint itself in issue even though no cross motion to dismiss has been made (Rand v Hearst Corp., 31 AD2d 406, 408; affd 26 NY2d 806; Smith v Heilbraun, 21 AD2d 830). Inasmuch as compliance with a statutorily imposed notice of claim requirement is deemed an element of the substantive cause of action (Siegel, New York Practice, § 32, p 33), the complaint against the city is insufficient as a matter of law and should be dismissed. Titone, J. P., Gibbons, O’Connor and Weinstein, JJ., concur.