Relator has appealed from an order of the county judge of Clinton county dismissing a writ of habeas corpus and remanding him to the custody of the warden of Clinton Prison. The facts are undisputed.
On March 20, 1930, relator, with four others, was indicted by a grand jury in New York county for the crime of murder in the first degree. On April 2, 1930, relator was arraigned on such charge in the Court of General Sessions and entered a plea of not guilty to the indictment. At the June, 1930, term of the Court of General Sessions, apparently because of his extreme youth, relator was permitted to withdraw his former plea of not guilty and to substitute in lieu thereof a plea of guilty to murder in the second degree. Thereupon the court sentenced relator on such plea to imprisonment in the State prison for a determinative term of twenty-five years, five years of such time being imposed by the court as increased punishment as provided by section 1944 of the Penal Law because of the fact that relator was armed with a pistol while engaged in the commission of the crime charged. The sentence imposed upon relator was clearly erroneous. Section 1048 of the Penal Law provides that the crime of murder in the second degree is punishable by imprisonment under an indeterminative sentence, the minimum of which shall not be less than twenty years and the maximum of which shall be for the offender’s natural life. This provision is mandatory and exclusive.
After the pronouncement of judgment relator was committed to the State prison and remained there until April 27, 1934, when the Court of General Sessions made an order directing the warden of the State prison to surrender relator in order that he might be produced *443before such court for resentence. On May 14, 1934, relator was again arraigned in the Court of General Sessions presided over by the judge who imposed the original sentence. The original sentence was vacated and relator was resentenced to imprisonment for an indeterminative term of not less than twenty-five years and not more than life, five years thereof being imposed pursuant to section 1944 of the Penal Law.
It is the contention of relator that the original sentence imposed upon him being void, and such sentence having been partially executed, and the term of court at which the same was given having expired, the court was without power to alter or in any manner modify the sentence adjudicated.
The general rule is that judgments, decrees and orders are within the control of the court during the term at which they were made. (Goddard v. Ordway, 101 U. S. 745; 25 L. Ed. 1040, 1043.) The rule is not confined to civil cases, but applies in criminal cases as well, provided the punishment be not augmented. (Ex Parte Lange, 18 Wall. 163, 167-174; 21 L. Ed. 872, 876-878; Basset v. United States, 9 Wall. 38; 19 L. Ed. 548; United States v. Benz, 282 U. S. 304.) This rule has prevailed from the earliest times. Lord Coke, in Coke on Littleton (1st Am. ed., vol. 2, § 438) says: “ Yet during the terme wherein any judicial! act is done, the record remaineth in the brest of the judges of the court, and in their remembrance, and therefore the roll is alterable during that terme, as the judges shall direct; but when the terme is past, then the record is in the roll, and admitteth no alteration, averment, or proofe to the contrarié.”
Where, however, a defendant has executed or entered upon the execution of a valid sentence, the court cannot, even during the term at which the sentence was rendered, set it aside and render a new sentence. The power of the court to make any alteration in the sentence has then come to an end. (16 C. J. 1314.)
Where a court of general jurisdiction has jurisdiction of the person and the offense the imposition of a sentence in excess of what the law permits does not render the legal and authorized portion of the sentence void but only leaves such portions of the sentence as may be in excess open to question and attack, provided the valid and invalid parts are separable. (8 R. C. L. 238; 16 C. J. 1312; Matter of Sweatman, 1 Cow. 144; People ex rel. Tweed v. Liscomb, 60 N. Y. 559; People ex rel. Woolf v. Jacobs, 66 id. 8; People ex rel. Trainor v. Baker, 89 id. 460.)
A person who has been sentenced by a court having jurisdiction of the offense and of the person, and who has served a portion of the time for which he was sentenced, may be resentenced, if, on appeal by him, it is determined that the original sentence was unlawful, *444and that such resentence does not put the defendant in jeopardy twice, or constitute a second punishment for the same offense. (8 K C. L. 239; 16 C. J. 1314.)
The only error in the case before us is an error in the sentence. The court had jurisdiction of the offense and of the offender. It would be an amazing doctrine to hold that the law is so helpless, so inadequate to public needs, that a prisoner whose guilt is clearly established should escape punishment merely because the court erred in passing sentence. That is just what relator asserts. We cannot sanction such a contention.
Relator cites the cases of Shepherd v. People (25 N. Y. 406) and Matter of Cedar (240 App. Div. 182; affd., 265 N. Y. 620) to sustain his position. These cases do not avail him. The Shepherd case was decided before the adoption of the Code of Criminal Procedure. The court was dealing with an ex post facto statute. At that time writs of error and certiorari were available in criminal cases. We need not pause to point out the distinctions between that case and this. Nothing written in that case is sufficiently persuasive to' cause us to conclude that the prisoner in this case should be set at liberty. In the Cedar case the sentence was legal in all respects. Four years after his conviction as a fourth offender and after the termination of the term of court at which he was sentenced defendant moved to be resentenced as a second offender. There it was held that the court was without power to reconsider, vacate, modify or amend the original sentence. The Appellate Division was careful to point out that a court of record has power, within definitely prescribed limits, to reconsider its judgment and to vacate, modify or amend it at the term of court at which the judgment was pronounced when the sentence has not been put into execution. It is important to bear in mind that in the Cedar case the court was dealing with a situation where a legal sentence was imposed. Here we have to do with a case where an illegal sentence was pronounced. Obviously the rules to be applied in each case are entirely different.
The power of a court of record to correct erroneous sentences and to impose proper ones has been recognized and exercised time out of mind.; .It is no longer an open question in this State. (People ex rel. Bork v. Gilbert, 96 N. Y. 631; People ex rel. Devoe v. Kelly, 97 id. 212; People ex rel. Friedman v. Hayes, 172 App. Div. 442; People v. Schaller, 224 id. 3; People ex rel. Temple v. Brophy, 248 id. 442; affd., 273 N. Y. 487; People ex rel. Marcley v. Lawes, 254 id. 249; People ex rel. Sloane v. Lawes, 255 id. 112.)
The order appealed from should be affirmed.
Hill, P. J., McNamee, Cbapseb and Bliss, JJ., concur.
Order affirmed..