
    Dexter Washington, Also Known as Eze Alimase, Appellant, v State of New York, Respondent.
    [57 NYS3d 220]
   Lynch, J.

Appeal from an order of the Court of Claims (Milano, J.), entered May 10, 2016, which, among other things, granted defendant’s cross motion for summary judgment dismissing the amended claim.

In 1997, claimant was convicted of two counts of burglary in the first degree and other crimes and was sentenced, as a second violent felony offender, to an aggregate prison term of 25 years, and his motion to vacate the judgment of conviction was denied (People v Washington, 282 AD2d 375 [2001], lv denied 96 NY2d 925 [2001]). As relevant here, in 2014, claimant filed an inmate grievance asserting that he should not be classified as a second violent felony offender, which was denied. While claimant’s administrative appeal of his grievance was pending, he commenced a proceeding in Supreme Court (Bartlett, J.) pursuant to CPLR article 70 for a writ of habeas corpus against the prison facility superintendent, Kathleen Gerbing, claiming that he was being unlawfully detained due to his improper classification as a second violent felony offender. Gerbing’s answer in that habeas corpus proceeding asserted that claimant had failed to exhaust administrative remedies in the grievance proceeding. Gerbing submitted an affidavit from an assistant director of inmate grievance programs — later determined to be incorrect — attesting that the administrative appeal of his grievance was still pending (hereinafter the exhaustion affidavit). Claimant’s ha-beas petition was later dismissed as “entirely lacking in merit.”

Claimant then commenced this action in the Court of Claims seeking money damages against defendant, alleging in an amended claim that Gerbing had submitted the exhaustion affidavit in the habeas corpus proceeding knowing that it was false, as a final administrative decision had been rendered on his grievance appeal. Defendant filed an answer asserting, among other defenses, that the Court of Claims lacked jurisdiction over the subject matter. Claimant thereafter moved to amend the amended claim and submitted a second proposed amended claim, seeking to add numerous causes of action all premised on the argument that his sentencing as a second violent felony offender was unlawful. The Court of Claims denied claimant’s motion to amend and granted defendant’s cross motion to dismiss the amended claim. Claimant appeals.

We affirm. The Court of Claims properly granted defendant’s cross motion and dismissed the amended claim. Claimant’s amended claim alleged that he was harmed by and is entitled to monetary damages as a result of Gerbing’s submission of a knowingly false exhaustion affidavit in the habeas corpus proceeding. However, Supreme Court dismissed the habeas corpus proceeding on the merits and based upon principles of res judicata, not based upon claimant’s failure to exhaust administrative remedies in the grievance proceedings. Thus, even accepting as true claimant’s allegation that Gerbing submitted a knowingly false exhaustion affidavit in the habeas corpus proceeding, that affidavit played no role in Supreme Court’s dismissal of the habeas corpus petition. Consequently, claimant was not harmed or prejudiced by the submission of the exhaustion affidavit. Given that the facts alleged, even if credited, do not “fit within any cognizable legal theory,” claimant has not stated a cause of action in the amended claim (He v Realty USA, 121 AD3d 1336, 1339 [2014] [internal quotation marks and citations omitted], lv dismissed and denied 25 NY3d 1018 [2015]), and the amended claim was properly dismissed.

We further find that the Court of Claims did not abuse its discretion or err in denying claimant’s motion to file the second amended claim (see CPLR 3025 [b]). “Leave to amend a pleading should be freely granted in the absence of prejudice or surprise resulting from the delay except in situations where the proposed amendment is wholly devoid of merit” (Loch Sheldrake Beach & Tennis Inc. v Akulich, 141 AD3d 809, 811 [2016] [internal quotation marks and citations omitted], lv dismissed 28 NY3d 1104 [2016]). Claimant’s proposed second amended claim alleged, among other causes of action, that he is being unjustly imprisoned and deprived of his rights as a result of his second felony offender classification, and he seeks damages. As the Court of Claims recognized, it lacks subject matter jurisdiction over the causes of action asserted in both claims. To that end, while the Court of Claims has subject matter jurisdiction “where the essential nature of the claim against defendant is to recover money, it does not lie where monetary relief is incidental to the primary claim” (Jackson v State of New York, 139 AD3d 1293, 1294 [2016]; see Court of Claims Act § 9). Here, we concur in the court’s conclusion that it lacks jurisdiction over the causes of action raised in both claims, as they are all premised upon the central argument that claimant is unlawfully confined due to a purported error in sentencing him as a second violent felony offender. As his claims for related monetary damages are “incidental to this primary argument,” the Court of Claims lacks jurisdiction, and properly dismissed the amended claim and denied the motion to file the second amended claim (id.). Claimant’s remaining contentions have been examined and found to be similarly unavailing.

Garry, J.P., Rose, Clark and Aarons, JJ., concur.

Ordered that the order is affirmed, without costs. 
      
      . Claimant thereafter mounted a variety of unsuccessful challenges to his conviction and second violent felony offender sentencing, in applications for a writ of habeas corpus (People ex rel. Washington v Burge, 30 AD3d 1066 [2006], lv denied 7 NY3d 711 [2006]; People ex rel. Washington v Graham, 64 AD3d 1181 [2009], lv denied 13 NY3d 707 [2009]; People ex rel. Washington v Napoli, 69 AD3d 1066 [2010], appeal dismissed 14 NY3d 858 [2010]; People ex rel. Washington v Gerbing, 2015 NY Slip Op 95015[U] [2015], appeal dismissed 27 NY3d 1017 [2016]), a proceeding in the nature of mandamus to compel (Matter of Washington v Lippman, 30 AD3d 299 [2006], appeal dismissed 7 NY3d 898 [2006]) and in a motion to vacate the sentence (People v Washington, 11 AD3d 389 [2004], mot dismissed 7 NY3d 783 [2006]).
     
      
      . The exhaustion affidavit was sworn to on July 15, 2014 and it was later established that claimant’s administrative appeal had already been resolved and found to be lacking in merit by determination of July 9, 2014.
     
      
      . While claimant named the author of the exhaustion affidavit as defendant, the Court of Claims amended the caption to name the State of New York as defendant.
     
      
      . Although denominated as a motion to dismiss, the motion was made postanswer and, thus, it was a motion for summary judgment that was based upon CPLR 3211 (a) grounds asserted in its answer (see Matter of Andrews v State of New York, 138 AD3d 1297, 1298 n 1 [2016], lv denied 27 NY3d 912 [2016]).
     
      
      . Claimant’s challenge to his second violent felony offender sentencing status is capable of being raised on direct appeal, in a CPL article 440 motion to vacate or in a proceeding pursuant to CPLR article 70 or 78, all of which he has unsuccessfully pursued (see n 1 supra; People ex rel. Washington v Napoli, 69 AD3d at 1067). As such, the Court of Claims also properly concluded that claimant’s present claims attempting to relitigate this issue are precluded by principles of collateral estoppel (see People ex rel. Washington v Napoli, 69 AD3d at 1067; Matter of LaRocco v Goord, 43 AD3d 500, 500 [2007]).
     