Opinion by
Henderson, J.,
The pending writ raises the question whether the imprisonment of the relator is lawful. He was indicted at December Sessions, 1901, in Columbia county, on one indictment for burglary and on another for carrying a concealed deadly weapon and wantonly and playfully pointing a pistol. He was convicted by a jury in the latter case and pleaded guilty on the indictment for burglary. Thereupon, he was sentenced in the burglary case to an indeterminate imprisonment of from seven and one-half to thirty years and on the indictment for wantonly and playfully pointing a pistol and carrying concealed weapons to an indeterminate sentence of from seven and one-half to thirty years, imprisonment in the latter case to begin at the termination of the sentence imposed in the first case. The record brought up on the certiorari issued with the writ of habeas corpus shows that the indictments are in the usual form for the offenses therein described. It is conceded that the maximum imprisonment for burglary is ten years and that for the offenses described in each of the three counts in the indictment for carrying concealed weapons and wantonly and playfully pointing a pistol the maximum imprisonment is one year. On the face of the record, therefore, the longest period of imprisonment to which the defendant could have been lawfully sentenced was thirteen years, but the maximum *556sentence actually imposed was sixty years. This discrepancy is accounted for on the supposition that the learned judge of the quarter sessions pronounced judgment under the Act of May 10, 1909, P. L. 495, which provides in the sixth section: “That when a person shall have twice before been convicted, sentenced and imprisoned in a penitentiary for a term of not less than one year for any crime committed in this state or elsewhere within the limits of the United States the court shall sentence said person to a maximum of thirty years.” We look in vain, however, for anything in the record which points to this act of assembly or gives footing for the conclusion that the defendant had been previously convicted and was subject to the increased penalty. The penalty for a crime punishment for which is imprisonment in the penitentiary is much severer under the statute referred to when the defendant has twice before suffered imprisonment of not less than one year in the penitentiary, and the prior offenses become a part of the description of and give quality to the crime for which the conviction was had. Repetition of crime adds aggravation to the later offense and is followed by severer consequences. It is recognized as a general principle that the judgment pronounced on a person for a crime should appear by the record to be a lawful penalty following his conviction. To leave to a trial judge to find from evidence not suggested in the record that the party convicted was guilty of the offense to which the greater punishment is attached would deprive the defendant of the right to a trial on a question vitally affecting his liberty and as to which he had a right to be heard. The identity of the person and the former imprisonment are matters of fact about which controversy might arise. It has been accordingly held in this and other-states that in case of a conviction and sentence for a second offense which involved a greater punishment the fact of the former imprisonment should be averred in the indictment. Thereby, the substantive offense which is followed by the greater punishment is *557specifically set forth and the defendant is enabled to make such reply as the facts permit. Rauch v. Com., 78 Pa. 490, was a ease of a conviction for selling liquor contrary to law in which the judge on his own knowledge of its records sentenced the defendants to imprisonment in the county jail as .on conviction of a second offense and it was there held that as the indictment did not inform the defendants of the full nature of the accusation against them the judgment could not be sustained. The same principle was applied in Sturtevant v. Com., 158 Mass. 598; State v. Lashus, 79 Me. 504; Evans v. State, 150 Ind. 651; People v. Sickles, 156 N. Y. 541. Statutes imposing penalties for crimes are to be strictly observed and a sentence not in accordance with the statute under which the defendant is indicted is void or voidable as the same may be without the jurisdiction of the court or in excess of the lawful duration of the time of imprisonment. It is manifest, therefore, that the judgment of the court is without statutory support and that the relator is confined under a sentence which is without authority of law. It does not necessarily follow, however, that a discharge of the prisoner must be directed. There has been a difference of view in various jurisdictions as to the validity of a judgment which exceeds in its period of imprisonment the time prescribed by law. In some cases it is held that the judgment is valid to the extent to which it might have been entered but void for the excess, and if we had power to revise the record in a habeas corpus proceeding a modification of the sentence might be decreed, but the record is not before us for review except in aid of the writ of habeas corpus. We have authority, however, to detain the prisoner and remit the record to the trial court for a resentence according to law. His complaint is not that he is wrongfully in prison but that the court had not jurisdiction to impose the penalty exhibited in the record. He is only entitled to relief to the extent to which his imprisonment would be unlawful. No good reason appears why this procedure *558should not prevail on a .writ of habeas corpus in which the cause of complaint does not touch the regularity of the proceeding in any respect except as to the extent of the term of imprisonment. The relator is not in confinement under a lawful judgment. He ought not to be set at liberty however until he has undergone the. imprisonment which the law imposes on one committing the offense to which he pleaded guilty and the offenses for which he was convicted. This is the practice approved in In re Bonner, 151 U. S. 242, where it was said that the defect in jurisdiction to enter the particular judgment could be cured by giving the court below an opportunity to pronounce the sentence which the law requires. By this course the relator is relieved from the excessive punishment imposed and the law is vindicated by the appropriate penalty. The learned counsel for the relator presented a carefully prepared argument in support of the position that the act of May 10, 1909, is unconstitutional, but we need not consider that as the question so far as it was raised in this case was decided in Com. ex rel. v. McKenty, 52 Pa. Superior Ct. 332, in which an opinion was handed down by President Judge Rice in December last.
Now, to wit, April 25th, 1913, it is ordered and adjudged that the relator be remanded for resentence and that the record be remitted to the court below to the end that appropriate process may be issued to bring him into that court for such resentence in accordance with law.