440.40 - Motion to set aside sentence; by people.

§ 440.40  Motion to set aside sentence; by people.    1.   At any time not more than one year after the entry of a judgment,  the court in which it was entered may, upon motion of  the  people,  set  aside  the  sentence  upon the ground that it was invalid as a matter of  law.    2.  Notwithstanding the provisions of subdivision one, the court  must  summarily  deny the motion when the ground or issue raised thereupon was  previously determined on the merits upon an appeal from the judgment  or  sentence,  unless  since  the time of such appellate determination there  has been a retroactively effective change in the  law  controlling  such  issue.    3.    Notwithstanding the provisions of subdivision one, the court may  summarily deny such a motion when the ground or issue  raised  thereupon  was  previously  determined  on  the  merits  upon  a  prior  motion  or  proceeding in a court of this state,  other  than  an  appeal  from  the  judgment  or sentence, unless since the time of such determination there  has been a retroactively effective change in the  law  controlling  such  issue.   Despite such circumstance, however, the court, in the interests  of justice and for good cause shown, may in  its  discretion  grant  the  motion if it is otherwise meritorious.    4.    The  motion must be made upon reasonable notice to the defendant  and to the attorney if any who appeared for him in the  last  proceeding  which  occurred  in  connection  with  the judgment or sentence, and the  defendant must be given adequate opportunity to appear in opposition  to  the  motion.  The defendant has a right to be present at such proceeding  but may waive such right in writing.  If he does not so waive it and  if  he is confined in a prison or other institution of this state, the court  must cause him to be produced at the proceeding upon the motion.    5.    An  order setting aside a sentence pursuant to this section does  not affect the validity or status  of  the  underlying  conviction,  and  after  entering such an order the court must resentence the defendant in  accordance with the law.    6.  Upon a resentence imposed pursuant to subdivision five, the  terms  of  which  are  more  severe  than  those  of the original sentence, the  defendant's time for taking an appeal from the judgment is automatically  extended in the manner prescribed in subdivision four of section 450.30.