In an action to recover damages for legal malpractice and breach of contract, the plaintiff appeals, as limited by his brief, from so much of an order of the Supreme Court, Nassau County (Sher, J.), dated July 10, 2012, as granted those branches of the motion of the defendant Snow Becker Krauss, PC., and the separate motion of the defendants Richard Reichler and Meltzer, Lippe, Goldstein, and Breitstone, LLR which were pursuant to CPLR 3211 (a) (5) to dismiss, as time-barred, the cause of action alleging legal malpractice insofar as asserted against each of them.
Ordered that the order is affirmed insofar as appealed from, with one bill of costs.
On March 5, 2003, the defendants, Richard Reichler, Snow Becker Krauss, PC., and Meltzer, Lippe, Goldstein, and Breitstone, LLI] allegedly advised the plaintiff in an opinion let*796ter that his proposed sale of certain property would not result in the loss of his tax deferment status. In 2007, the Internal Revenue Service (hereinafter the IRS) notified the plaintiff that its determination was to the contrary, and directed him to remit back taxes, along with penalties and interest, totaling approximately $5 million. The plaintiff allegedly retained the services of the defendants to represent him against the IRS. On March 31, 2009, the IRS concluded that its determination was correct. One month later, on April 30, 2009, the plaintiff discharged counsel and retained new counsel. He filed a petition in the United States Tax Court challenging the IRS’s determination, but, ultimately, on July 25, 2011, the court concluded that the IRS’s determination was correct. On December 29, 2011, the plaintiff commenced this action alleging, inter alia, legal malpractice against the defendants, and they moved, inter alia, to dismiss that cause of action as time-barred. The Supreme Court granted those branches of their respective motions.
“On a motion to dismiss a complaint pursuant to CPLR 3211 (a) (5) on statute of limitations grounds, the moving defendant must establish, prima facie, that the time in which to commence the action has expired” (Zaborowski v Local 74, Serv. Empls. Intl. Union, AFL-CIO, 91 AD3d 768, 768-769 [2012]). In a legal malpractice action, the statute of limitations is three years (see CPLR 214 [6]). “A legal malpractice claim accrues ‘when all the facts necessary to the cause of action have occurred and an injured party can obtain relief in court’ ” (McCoy v Feinman, 99 NY2d 295, 301 [2002], quoting Ackerman v Price Waterhouse, 84 NY2d 535, 541 [1994]). Here, the defendants met their prima facie burden by establishing that the cause of action alleging legal malpractice accrued on March 5, 2003, the date they allegedly issued the opinion letter advising the plaintiff that the proposed sale would not result in the loss of his tax deferment status (see Ackerman v Price Waterhouse, 84 NY2d at 541-543; Byron Chem. Co., Inc. v Groman, 61 AD3d 909 [2009]). Although the plaintiff did not discover that his attorneys’ alleged advice was incorrect until years later, “ ‘[w]hat is important is when the malpractice was committed, not when the client discovered it’ ” (McCoy v Feinman, 99 NY2d at 301, quoting Shumsky v Eisenstein, 96 NY2d 164, 166 [2001]). Therefore, since the defendants demonstrated that the plaintiff did not commence this action until December 29, 2011, more than three years after his claim for legal malpractice accrued, the defendants established, prima facie, that the claim was time-barred.
Upon that showing, the burden then shifted to the plaintiff to raise a question of fact as to whether he actually commenced *797the action within three years after the legal malpractice cause of action accrued, the statute of limitations was tolled, or the statute of limitations relied on by the defendants was otherwise inapplicable (see Zaborowski v Local 74, Serv. Empls. Intl. Union, AFL-CIO, 91 AD3d at 769). The plaintiff, in opposition to the defendants’ showing, relies on the continuous representation doctrine as a toll of the three-year statute of limitations; however, he failed to raise a question of fact in this regard. As evidenced by, inter alia, the more than four-year period of time between the issuance of the opinion letter and the plaintiffs alleged retention of the defendants in July 2007, during which no further legal representation was undertaken with respect to the subject matter of the opinion letter, the parties did not contemplate that any further representation was needed (see McCoy v Feinman, 99 NY2d at 306; Byron Chem. Co., Inc. v Groman, 61 AD3d at 911).
Accordingly, the Supreme Court properly granted those branches of the defendants’ respective motions which were pursuant to CPLR 3211 (a) (5) to dismiss, as time-barred, the cause of action alleging legal malpractice.
The defendants’ remaining contentions have been rendered academic in light of our determination. Rivera, J.P, Skelos, Chambers and Hall, JJ., concur. [Prior Case History; 36 Mise 3d 1218(A), 2012 NY Slip Op 51393(U)„]