(i) Institutional confinement for the term authorized by law of the defendant is or may not be necessary for the protection of the public;
(ii) the defendant is in need of guidance, training or other assistance which, in his case, can be effectively administered through probation supervision; and
(iii) such disposition is not inconsistent with the ends of justice.
(b) The court, with the concurrence of either the administrative judge of the court or of the judicial district within which the court is situated or such administrative judge as the presiding justice of the appropriate appellate division shall designate, may sentence a person to a period of probation upon conviction of a class A-II felony defined in article two hundred twenty, the class B felony defined in section 220.48 of this chapter or any other class B felony defined in article two hundred twenty of this chapter where the person is a second felony drug offender as defined in paragraph (b) of subdivision one of section 70.70 of this chapter, if the prosecutor either orally on the record or in a writing filed with the indictment recommends that the court sentence such person to a period of probation upon the ground that such person has or is providing material assistance in the investigation, apprehension or prosecution of any person for a felony defined in article two hundred twenty or the attempt or the conspiracy to commit any such felony, and if the court, having regard to the nature and circumstances of the crime and to the history, character and condition of the defendant is of the opinion that:
(i) Institutional confinement of the defendant is not necessary for the protection of the public;
(ii) The defendant is in need of guidance, training or other assistance which, in his case, can be effectively administered through probation supervision;
(iii) The defendant has or is providing material assistance in the investigation, apprehension or prosecution of a person for a felony defined in article two hundred twenty or the attempt or conspiracy to commit any such felony; and
(iv) Such disposition is not inconsistent with the ends of justice. * Provided, however, that the court shall not, except to the extent authorized by paragraph (d) of subdivision two of section 60.01 of this chapter, impose a sentence of probation in any case where it sentences a defendant for more than one crime and imposes a sentence of imprisonment for any one of the crimes, or where the defendant is subject to an undischarged indeterminate or determinate sentence of imprisonment which was imposed at a previous time by a court of this state and has more than one year to run. * NB Effective until September 1, 2020 * Provided, however, that the court shall not, except to the extent authorized by paragraph (d) of subdivision two of section 60.01 of this chapter, impose a sentence of probation in any case where it sentences a defendant for more than one crime and imposes a sentence of imprisonment for any one of the crimes, or where the defendant is subject to an undischarged indeterminate or reformatory sentence of imprisonment which was imposed at a previous time by a court of this state and has more than one year to run. * NB Effective September 1, 2020 2. Sentence. When a person is sentenced to a period of probation the court shall, except to the extent authorized by paragraph (d) of subdivision two of section 60.01 of this chapter, impose the period authorized by subdivision three of this section and shall specify, in accordance with section 65.10, the conditions to be complied with. The court may modify or enlarge the conditions or, if the defendant commits an additional offense or violates a condition, revoke the sentence at any time prior to the expiration or termination of the period of probation. 3. Periods of probation. Unless terminated sooner in accordance with the criminal procedure law, the period of probation shall be as follows:
(a) (i) For a felony, other than a class A-II felony defined in article two hundred twenty of this chapter or the class B felony defined in section 220.48 of this chapter, or any other class B felony defined in article two hundred twenty of this chapter committed by a second felony drug offender, or a sexual assault, the period of probation shall be a term of three, four or five years;
(ii) For a class A-II felony drug offender as defined in paragraph (a) of subdivision one of section 70.71 of this chapter as described in paragraph (b) of subdivision one of this section, or a class B felony committed by a second felony drug offender described in paragraph (b) of subdivision one of this section, the period of probation shall be life and for a class B felony defined in section 220.48 of this chapter, the period of probation shall be twenty-five years;
(iii) For a felony sexual assault, the period of probation shall be ten years.
(b) (i) For a class A misdemeanor, other than a sexual assault, the period of probation shall be a term of two or three years;
(ii) For a class A misdemeanor sexual assault, the period of probation shall be six years.
(c) For a class B misdemeanor, the period of probation shall be one year, except the period of probation shall be no less than one year and no more than three years for the class B misdemeanor of public lewdness as defined in section 245.00 of this chapter;
(d) For an unclassified misdemeanor, the period of probation shall be a term of two or three years if the authorized sentence of imprisonment is in excess of three months, otherwise the period of probation shall be one year. For the purposes of this section, the term "sexual assault" means an offense defined in article one hundred thirty or two hundred sixty-three, or in section 255.25, 255.26 or 255.27 of this chapter, or an attempt to commit any of the foregoing offenses. 4. If during the periods of probation referenced in subparagraph (i) of paragraph (a), subparagraph (i) of paragraph (b) and paragraph (d) of subdivision three of this section an alleged violation is sustained following a hearing pursuant to section 410.70 of the criminal procedure law and the court continues or modifies the sentence, the court may extend the remaining period of probation up to the maximum term authorized by this section. Provided, however, a defendant shall receive credit for the time during which he or she was supervised under the original probation sentence prior to any declaration of delinquency and for any time spent in custody pursuant to this article for an alleged violation of probation. 5. In any case where a court pursuant to its authority under subdivision four of section 60.01 of this chapter revokes probation and sentences such person to imprisonment and probation, as provided in paragraph (d) of subdivision two of section 60.01 of this chapter, the period of probation shall be the remaining period of the original probation sentence or one year whichever is greater.