In an action, inter alia, to recover damages for legal malpractice, the plaintiff appeals from a judgment of the Supreme Court, Nassau County (Cozzens, Jr., J.), entered April 16, 2007, which, upon an order of the same court dated April 4, 2007, granting the defendants’ motion for summary judgment dismissing the complaint, dismissed the complaint.
Ordered that the judgment is affirmed, with costs.
In order to prevail in an action to recover damages for legal malpractice, a plaintiff must establish that the defendant attorney failed to exercise the level of skill and knowledge commonly possessed by a member of the legal profession, and that the failure proximately caused the plaintiff to sustain actual and ascertainable damages (see Rudolf v Shayne, Dachs, Stanisci, Corker & Sauer, 8 NY3d 438, 442 [2007]; Olaiya v Golden, 45 AD3d 823 [2007]). To establish causation, the *658plaintiff must show that, but for the attorney’s negligence, he or she would have prevailed in the underlying action (see Rudolf v Shayne, Dachs, Stanisci, Corker & Sauer, 8 NY3d at 442; Carrasco v Pena & Kahn, 43 AD3d 395 [2008]).
On their motion for summary judgment, the defendants made a prima facie showing that the plaintiff would be unable to prove at trial that, but for their alleged malpractice, he would have overcome the affirmative defense of “unclean hands” and prevailed in the underlying action. In opposition, the plaintiff failed to raise a triable issue of fact. Accordingly, the Supreme Court properly granted the defendants’ motion for summary judgment dismissing the complaint (see Asher v Shlimbaum, 45 AD3d 791 [2007]). Fisher, J.E, Ritter, Dillon and McCarthy, JJ., concur.