
    The People of the State of New York, Respondent, v Andre Collier, Appellant.
    [912 NYS2d 722]
   Rose, J.P.

Appeal, by permission, from an order of the County Court of Albany County (Breslin, J.), entered August 19, 2009, which denied defendant’s motion pursuant to CPL 440.10 and 440.20 to vacate the judgment convicting him of the crime of robbery in the first degree (two counts) and to set aside the sentence, without a hearing.

In 2005, defendant was charged in an indictment with five counts of robbery in the first degree. In full satisfaction thereof, he pleaded guilty to counts one and five and was sentenced, in accordance with the negotiated plea agreement, to consecutive prison terms of 25 years and five years, respectively. Both sentences also included a five-year period of postrelease supervision. In 2006, the Department of Correctional Services informed County Court that the five-year sentence was statutorily impermissible because Penal Law § 70.04 (3) (a) requires that a determinate sentence for a second violent felony offender convicted of a class B felony be at least 10 years. Defendant has yet to be resentenced and, on his direct appeal in 2008, we found defendant’s lone assertion — that the imposed sentences were harsh and excessive — to be precluded by his valid waiver of appeal, and affirmed the judgment of conviction (People v Collier, 52 AD3d 1121, 1122 [2008], lv denied 11 NY3d 786 [2008]).

Subsequently, defendant moved pursuant to CPL article 440 to vacate the judgment of conviction and to set aside the sentence, arguing that he should be permitted to withdraw his plea because of the illegality of the sentence on count five of the indictment. County Court, noting that defendant had been sentenced as a second felony offender rather than as a second violent felony offender, denied the motion without a hearing on the basis that defendant failed to raise the issue on his direct appeal. This appeal ensued.

The sentence imposed is illegal even if defendant is considered a second felony offender. The minimum available prison term for a second felony offender sentenced for a class B violent felony offense is eight years (see Penal Law § 70.06 [6] [a]). Further, a motion to set aside a sentence pursuant to CPL 440.20 is not barred by the failure to raise the issue of illegality on the direct appeal (see People v McCants, 15 AD3d 892, 893 [2005]). Inasmuch as an illegal sentence cannot stand, and “the entire sentence is ‘part and parcel of the plea bargain/ it must be vacated in its entirety regardless of whether portions of the sentence are legal” (People v Sheils, 288 AD2d 504, 505 [2001], Iv denied 97 NY2d 733 [2002], quoting People v Sellers, 222 AD2d 941 [1995]; see People v Ciccarelli, 32 AD3d 1175, 1176 [2006]; People v Martin, 278 AD2d 743, 744 [2000]). Accordingly, we remit to County Court to either resentence defendant in a manner that ensures that he receives the benefit of his sentencing bargain or permit both parties the opportunity to withdraw from the plea agreement (see People v Cameron, 83 NY2d 838, 840 [1994]; People v Warren, 74 AD3d 1639, 1640 [2010]; see generally People v Selikoff, 35 NY2d 227, 240-242 [1974]; People v Surdis, 23 AD3d 841, 842-843 [2005], Iv denied 6 NY3d 818 [2006]; People v Sheils, 288 AD2d at 505-506).

Lahtinen, Stein, McCarthy and Garry, JJ., concur. Ordered that the order is modified, on the law, by vacating defendant’s sentence; matter remitted to the County Court of Albany County for further proceedings not inconsistent with this Court’s decision; and, as so modified, affirmed. 
      
      . In any event, we note that classification as a second violent felony offender is mandatory (see CPL 400.15 [1], [2]; People v Scarbrough, 66 NY2d 673, 674 [1985], revg on dissenting mem of Boomer, J., 105 AD2d 1107, 1107-1109 [1984]; People v Nix, 71 AD3d 1505, 1505-1506 [2010], Iv denied 15 NY3d 754 [2010]).
     
      
      . To the extent that this Court’s prior decisions may be read to preclude a CPL 440.20 motion where the illegality of the sentence could have been raised on a direct appeal (see People v Pratt, 23 AD3d 770, 771 [2005], Iv dismissed 6 NY3d 816 [2006]; People v O’Hanlon, 13 AD3d 718, 719 [2004]; People v Pham, 287 AD2d 789, 790 [2001]), they should not be followed.
     