In an action to recover damages for breach of contract and professional malpractice, the plaintiffs appeal from so much of an order of the Supreme Court, Nassau County (Christ, J.), dated January 12, 1987, as granted that branch of the defendant’s motion which was to dismiss the first cause of action, sounding in legal malpractice, as time barred.
Ordered that the order is reversed insofar as appealed from, on the law, with costs, and that branch of the defendant’s motion which was to dismiss the first cause of action as time barred is denied.
*185The defendant, an attorney, was retained by the plaintiffs to represent them in the purchase of certain real property. At the closing on January 26, 1981, the plaintiffs learned that a portion of the parcel, measuring approximately 7 by 60 feet and lying inside a fence belonging to owners of a neighboring parcel, would not be insured by their title company. The defendant represented to the plaintiffs that the problem could be easily resolved. Soon after the closing, the defendant advised the plaintiffs to remove the fence and a shed from the disputed portion of the parcel.
The adjoining landowner eventually commenced a suit to obtain record title to the disputed portion of the parcel, claiming adverse possession. When the plaintiffs sought the defendant’s representation in the matter, he referred them to an associate in his own firm, apparently because he anticipated being called as a witness in the suit. The defendant’s firm appeared and represented plaintiffs in the litigation, which culminated on November 20, 1984, in a judgment against them. The plaintiffs commenced this action against the defendant on or about September 5, 1986, claiming damages for legal malpractice and breach of contract.
We conclude that the "continuing representation” doctrine operated to toll the running of the Statute of Limitations (see, Glamm v Allen, 57 NY2d 87) until November 20, 1984, since it is clear that the defendant’s firm continued to represent the plaintiffs in the action brought by the adjoining landowners, which action was directly related to the defendant’s representation of the plaintiffs with respect to the disputed portion of the subject parcel (see, Drab v Baum, 114 AD2d 992; Peduto v Durr, 97 AD2d 959; Grassi v Tatavito Homes, 90 AD2d 479, affd 58 NY2d 1038). Accordingly, the legal malpractice cause of action was timely brought. Kooper, J. P., Sullivan, Harwood and Balletta, JJ., concur.