In an action to recover damages for personal injuries, the plaintiff appeals from an order of the Supreme Court, Queens County (Price, J.), dated October 4, 2004, which granted the motion of the defendants 121 St. Nicholas Avenue H.D.F.C. and Novalex Contracting Corp. pursuant to CPLR 3211 (a) (5) to dismiss the complaint insofar as asserted against the défendant 121 St. Nicholas Avenue H.D.F.C. and for summary judgment dismissing the complaint insofar as asserted against the defendant Novalex Contracting Corp., and denied his cross motion to strike the affirmative defenses of those defendants which were based on the existence of a release.
Ordered that the order is modified, on the law, by deleting the provision thereof granting the motion and substituting therefor a provision denying the motion; as so modified, the order is affirmed, without costs or disbursements, and the complaint is reinstated against the defendants 121 St. Nicholas H.D.F.C. and Novalex Contracting Corp.
The plaintiff argues that a general release, purporting to release the defendants 121 St. Nicholas Avenue H.D.F.C. and Novalex Contracting Corp. (hereinafter collectively the defendants), as well as the plaintiffs employer and others, violated the Workers’ Compensation Law and, thus, was unenforceable (see Workers’ Compensation Law §§ 32 and 33). Although the plaintiff may properly raise the issue of the release’s illegality for the first time on appeal (see Matter of Niagara Wheatfield Adm’rs Assn. [Niagara Wheatfield Cent. School Dist.], 44 NY2d 68, 71 [1978]; Matter of Ungar v Matarazzo Blumberg & Assoc., 260 AD2d 485, 486 [1999]), we disagree with the plaintiff’s argument that the release is void in toto. A court may enforce the legal aspects of an agreement, when the illegal aspects of the agreement are incidental to the legal aspects and are not *430the main objective of the agreement (see Paulus v Kuchler, 214 AD2d 608, 609 [1995]). Here, the illegal aspects of the release involve only the plaintiff and his employer, a nonparty. As such, the illegal aspects of the release are incidental to the legal issue raised on this appeal regarding whether or not the release is enforceable as between the plaintiff and the defendants.
The evidence raised a triable issue of fact as to whether or not the plaintiff executed the general release as a result of duress, illegality, fraud, or mutual mistake (see generally Mangini v McClurg, 24 NY2d 556 [1969]; Aharon v Kwang Kim, 205 AD2d 719 [1994]). The plaintiffs affidavit, submitted in opposition to the defendants’ motion, asserted that the plaintiff was told by his employer that, if he did not sign the release, he would be fired from his job and reported to immigration authorities. Further, the defendant 121 St. Nicholas Avenue H.D.F.C. conceded, through the affirmation of counsel in opposition to the plaintiffs cross motion, that the question of whether the release was obtained by fraud or duress was a fact question for the jury. As a court should not strike an affirmative defense when material issues of fact are unresolved, the Supreme Court properly denied the plaintiff’s cross motion to strike the defendants’ affirmative defenses based on the existence of a release (see CPLR 3211 (b) and 3212; Art Stone Theat. Corp. v Technical Programming & Sys. Support of Long Is., 157 AD2d 689, 691 [1990]). By extension, if questions of fact exist as to whether the release was a product of duress, illegality, fraud, or mutual mistake, the defendants’ motion, inter alia, to dismiss the complaint on the basis of the same release must be denied. Crane, J.P., Santucci, Spolzino and Dillon, JJ., concur.