
4 N.Y.2d 59 (1958)
The People of the State of New York ex rel. Michael Kern, on Behalf of Harry Gross, Appellant,
v.
Harry Silberglitt, as Warden of the Penitentiary of the City of New York, Respondent.
Court of Appeals of the State of New York.
Argued November 18, 1957.
Decided February 28, 1958.
Michael Kern for appellant.
Edward S. Silver, District Attorney (William I. Siegel of counsel), for respondent.
Judges DYE, FULD and BURKE concur with Judge DESMOND; Judge FROESSEL dissents in an opinion in which Chief Judge CONWAY and Judge VAN VOORHIS concur.
*60DESMOND, J.
This is a habeas corpus proceeding contesting a sentence imposed on one Harry Gross. In February, 1956, when Gross was found guilty of a violation of probation, the *61 County Judge had under the pertinent statutes a choice between two kinds of imprisonment. He could have ordered confinement in a penal institution for not more than one year (Penal Law, §§ 600, 1937) or in a reformatory-type institution for an indeterminate term not exceeding three years (Correction Law, § 203). He chose the latter. The reformatory-type sentence, however, was forbidden by law for any convicted person who was "mentally or physically incapable of being substantially benefited" by reformatory treatment (Correction Law, § 203). As we held in People v. Thompson (251 N.Y. 428, 432), such a sentence "is necessarily based upon a previous determination that the offender is not incapable of such benefit". In this instance, however, the sentencing Judge talked one way but acted another way. He announced at some length his conclusion that Gross was beyond redemption, but when it came to the actual mandate he (incongruously and inconsistently) ordered an indeterminate sentence.
Gross took an appeal from the conviction but up to the date of this present decision in this court that appeal has not been prosecuted. A year after sentence relator sued out this writ of habeas corpus. We agree with the Appellate Division that the remedy is not available. It is only when "relator's sentence is for a term longer than authorized by statute" (People ex rel. Carollo v. Brophy, 294 N.Y. 540, 542) that habeas corpus may be invoked to correct it (People ex rel. Tweed v. Liscomb, 60 N.Y. 559, 591, 592; People ex rel. Milton v. Jackson, 297 N.Y. 708). "The writ of habeas corpus they cannot use, since their convictions were by a court which had jurisdiction of their persons and of the crimes they were charged with, and power to declare the particular sentences meted out to them" (Matter of Hogan v. New York Supreme Court, 295 N.Y. 92, 97). The question is one of power, not of propriety or good judgment, and power existed here. In People v. Bendix (260 N.Y. 590) this court upheld the indeterminate reformatory sentence, in a situation much like the one we are here describing. When Bendix was sentenced, the Presiding Justice read into the minutes defendant's record of 10 convictions including 4 felonies. His counsel argued to the sentencing court and later to this court on appeal that the indeterminate reformatory sentence was illegal and *62 obviously punitive rather than correctional. We affirmed the judgment of conviction (for another case similar to Bendix see People v. La Rue, 266 App. Div. 995).
It is no mere technicality to hold that this error, if such it was, may not be reached by habeas corpus. All this matter of sentencing appeared on the face of the record and the alleged invalidity of the sentence was argued to the County Judge by the attorney representing Gross. No reason appears why Gross should have this additional remedy besides appeal which he failed to use. Appeal was the method employed to raise this very question in People v. Thompson (251 N.Y. 428, supra); People v. Bendix (260 N.Y. 590, supra), and People v. Tower (308 N.Y. 123).
Of course, we cannot close our eyes to these irregularities or fail to realize that this kind of sentence, authorized by the Legislature for one purpose, is being used for quite a different one. But since habeas corpus is the wrong remedy, we cannot reach in this case the question of the propriety of this sentence.
The order should be affirmed.
FROESSEL, J. (dissenting).
On March 30, 1955 defendant, having some four years previously been indicted for multiple criminal contempts, appeared before a County Judge of Kings County, after serving the intervening time in prison on other charges, and pleaded guilty to one of the counts. The County Judge suspended sentence, and fixed a probationary period of one year, adding as a caution to defendant: "if you violate the law, if you associate with gamblers, if you frequent race tracks, and you go back to the old life that you led * * * my arm will stretch out, and I will bring you back here and I will clap you into jail so fast that you would not know what happened to you".
In December, 1955 defendant was again arraigned before the same County Judge on a charge that he had violated the terms of his probation by frequenting race tracks in New Orleans, Louisiana. A hearing was held on February 1, 1956 at which evidence was adduced tending to show that defendant had violated the terms of his probation, which he admitted. The Judge then proceeded to address himself to relator as follows:

*63"This man here runs true to a pattern, and you know it as well as I do. I said I had my fingers crossed then, and I was right. He runs true to a pattern. You can no more change him the longest day he lives that [sic] you will take the spots off a leopard. He will never be any different. He cannot be; it is part of the very being, it is part of the very blood that courses through his veins.
* * *
I had hoped this man would turn over a new leaf. I sincerely wished him well. * * * But it is just a case of talent and ability in a wrong container. Capone had ability, too, organizing abilities. So does this man. But I do not think he will ever change. I do not think he ever will.
Mr. Kern: Will your Honor please consider the maximum which the decisions and the statutes have in mind, decisions of one year?
The Court: I do not think he ever will change.
Mr. Kern: The Court said probation for one year.
The Court: God knows, Judges and District Attorneys, Special Sessions Judges, the Corporation Counsel's Office, this Court; everybody has tried to be helpful to give him a chance to go straight and to be decent. I do not think it is in him.
Mr. Kern: Judge Leibowitz, even if it is not, one year punishment for what he did, frequenting the race tracks, is a lot of punishment.
The Court: Mr. Kern, please. * * * You have to look at the whole picture of who this man is and what his prognosis is, just what is ahead of him; what he will ever be. He will never be anything but Harry Gross. If I saw a glimmer of hope for him, I would exercise my prerogative as a Judge in that regard. He is absolutely and unqualifiedly contemptuous of all legal authority. There is nothing but contempt in him for everything that means law and order and he does not surrender until the rope is around his neck. It is not merely of a man falling from grace by going to a race track; it is more than that. I do not want the word to go out that he is being punished just because he went to a race track. It is the life this man is leading, who he is and what he is and what he means to society, the damages that he can do. If he only did damage to himself, nobody would care. But it is the harm that he *64 wreaks. I do not think it is beyond him to start in a new organization which led to his original indictment. It is not beyond him.

The sentence of the Court is that he be confined to the New York City Penitentiary. The defendant is remanded.
Mr. Kern: Would your Honor make that one year?
The Court: If the Parole Board asks me, I am going to recommend that he be kept there three years." (All emphasis supplied.)
The indeterminate sentence confining defendant to the New York City Penitentiary was imposed pursuant to article 7-A of the Correction Law. That article was the successor to the Parole Commission Law (L. 1915, ch. 579). The purpose of this article and its predecessor statutes was to provide in certain cases that "where there is possibility of substantial benefit from an indeterminate sentence to an institution maintained for correctional and reformatory purposes, such a sentence should be imposed upon an offender" (People v. Thompson, 251 N.Y. 428, 431; People ex rel. Gordon v. Ashworth, 290 N.Y. 285, 288-289; People ex rel. Rabiner v. Warden of City Prison, 209 App. Div. 795, 797); its object is "moral reformation" (People ex rel. Kipnis v. McCann, 199 App. Div. 30, 38, affd. 234 N.Y. 502). This purpose is recognized in the statute itself, since subdivision e of section 203 of the Correction Law states that the article "shall not apply to any person who is * * * (3) * * * mentally or physically incapable of being substantially benefited by being committed to a correctional and reformatory institution". (Emphasis supplied.)
It does not appear from the record before us that defendant has appealed from his conviction in this case. A previous habeas corpus proceeding was dismissed as premature (5 Misc 2d 502). In the present habeas corpus proceeding, Special Term dismissed the application and the Appellate Division affirmed, holding that the "penitentiary sentence imposed raises an irrebuttable presumption that the court did not find the defendant incapable of being substantially benefited by a commitment to a correctional and reformatory institution", citing People v. Thompson (251 N.Y. 428). The Appellate Division also added a ground of affirmance based upon the unavailability of the writ of habeas corpus, to which we shall advert later.
*65In People v. Thompson (251 N.Y. 428, supra), a defendant convicted of illegally practicing medicine was sentenced by the Court of Special Sessions to a one-year term in the New York County Penitentiary. Thereafter the court, on its own motion, and over defendant's protest, reconsidered its sentence, and substituted a commitment to the penitentiary for an indeterminate term. The court was of the opinion that it had no power to impose the definite sentence (Record on Appeal, pp. 11, 51-58; see, also, 251 N.Y. 434 [dissenting opinion]). When the case came to our court, the question before us, as stated by Judge LEHMAN (p. 431), was: "whether in the absence of an express affirmative finding that the offender was incapable of being substantially benefited, there is a conclusive presumption that the court has failed to perform its duty to pass upon the offender's capacity to benefit from an indeterminate sentence before it proceeded to impose a fixed sentence." (Emphasis supplied.) We decided, by a vote of 4 to 3, that the court did have the power to impose the original sentence, having the alternative of imposing definite or indefinite sentence depending upon its view of defendant's reformability. We further decided that the fact that there was no evidence of an affirmative finding that defendant was incapable of reformation did not invalidate the original sentence, since there was no requirement that the sentencing court make an express finding on reformability before imposing sentence, and the imposition of the sentence itself under the circumstances implied a finding. The dissenting opinion stated that the failure to make a finding invalidated the sentence because there was a presumption that defendant was reformable, and the action of the court in imposing the indeterminate sentence subsequently indicated that it had not determined defendant to be incapable of benefit from correctional institutionalization.
Thus both opinions were predicated upon a situation where there was no affirmative finding, at the time of imposition of either sentence, bearing upon the trial court's determination other than imposition of the sentence itself. In this case, however, we have clear, unequivocal findings that defendant was incapable of reformation, uttered by a Judge who was thoroughly familiar with his entire background.
*66A number of cases have applied the Thompson case to situations in which the defendant had a criminal record, but in none of them was there an affirmative finding of incorrigibility as we have here (People v. Porfido, 279 App. Div. 1036; People ex rel. Welch v. Slattery, 179 Misc. 899, 903; People ex rel. Medina v. Slattery, 178 Misc. 741, 744; People ex rel. Montana v. Warden of New York City Penitentiary, 171 Misc. 533; People ex rel. Scott v. McDonald, 9 Misc 2d 443; see People ex rel. Halle v. Ashworth, 9 Misc 2d 451, affd. 268 App. Div. 765; cf. People ex rel. Standik v. Ashworth, 9 Misc 2d 444, affd. 266 App. Div. 775). Of course the fact that a person has a previous criminal record does not preclude a finding that he is reformable, and so we held in People v. Bendix (260 N.Y. 590) and People v. Tower (308 N.Y. 123, 125).
Sentences have also been upheld in the lower courts where the Trial Judge has made ambiguous or conflicting statements on the question of defendant's reformability (People ex rel. Berry v. McDonnell, 278 App. Div. 904, appeal dismissed 303 N.Y. 624, cert. denied 342 U. S. 956; People ex rel. Berry v. Klein, 198 Misc. 742; People ex rel. Granza v. Johnston, 9 Misc 2d 446, affd. 271 App. Div. 825; People ex rel. Travatello v. Ashworth, 268 App. Div. 892, revg. 182 Misc. 52; People ex rel. Pastore v. Ashworth, 9 Misc 2d 445; People ex rel. Schurman v. Ashworth, 9 Misc 2d 448), but again there was no clear affirmative finding of incorrigibility in any of those cases, such as we have here.
In a number of the cases decided in the first department and cited above, Special Term sitting in Bronx County stated  as did the Appellate Division in this case  that the Thompson case held that, no matter what the sentencing Judge said and did prior to the imposition of sentence, the sentence carries with it an irrebuttable presumption of validity; (to the contrary see People ex rel. Hauser v. McDonnell, 198 Misc. 738 [Special Term, Kings County]; see, also, People ex rel. Welch v. Slattery, 179 Misc. 899, 904, supra [Special Term, Bronx County]; People ex rel. Gordon v. Ashworth, 9 Misc 2d 449 [Special Term, Bronx County], mod. 264 App. Div. 201, affd. as mod. 290 N.Y. 285). As was indicated earlier, the Thompson case is not authority for that proposition where there is "an express affirmative finding that the offender was incapable of *67 being substantially benefited". We have in this case what is tantamount to such a finding.
If there is, as we have said there is and as the statute requires, a duty upon the sentencing Judge to determine whether a prisoner is capable of reformation before imposing sentence upon him, and if the sentencing Judge undertakes to declare in no uncertain terms his opinion as to the prisoner's capability of reformation, we do not see how we can ignore those remarks in determining whether the sentencing Judge has performed his duties properly, and hold in effect that he did not mean what he very plainly said. We cannot allow a determination to stand when it is contrary to everything expressed by the trial court in the record.
A Trial Judge, even with the best of intentions, may not apply his personal notions as to what is just in a given case. When the statute says that a person shall not be committed to a reformatory under an indeterminate sentence when he is "mentally or physically incapable of being substantially benefited" thereby, and the Trial Judge finds as to such a person: "You can no more change him the longest day he lives that [sic] you will take the spots off a leopard. He will never be any different. He cannot be; it is part of the very being, it is part of the very blood that courses through his veins"; states three times: "I do not think he will ever change"; that he does not think "it is in [the defendant] to go straight and be decent"; and concludes: "If I saw a glimmer of hope for him, I would exercise my prerogative as a Judge in that regard. He is absolutely and unqualifiedly contemptuous of all legal authority. There is nothing but contempt in him for everything that means law and order and he does not surrender until the rope is around his neck"  all without a single mitigating word, he is holding in total effect that defendant is "mentally or physically incapable of being substantially benefited by being committed to a correctional and reformatory institution". He is then without power to commit such defendant to a reformatory under an indeterminate sentence simply because the offender may be thus imprisoned for a longer time than the law provides.
In our opinion, then, the proper rule is that where there is no statement of the sentencing Judge, the sentence is conclusively *68 presumed to be valid. The rule is not different where the Trial Judge has made ambiguous or inconsistent statements respecting defendant's reformability. Where, however, there is an unequivocal "affirmative finding that the offender was incapable of being substantially benefited"  as we have here  the imposition of a sentence under article 7-A of the Correction Law is contrary to law. It follows that defendant is presently "unlawfully imprisoned or restrained in his liberty" (Civ. Prac. Act, §§ 1262, 1259).
The majority hold that habeas corpus does not lie here, and that it "is only when `relator's sentence is for a term longer than authorized by statute' that habeas corpus may be invoked", yet that is precisely what occurred here. Section 203 (subd. [e]) of the Correction Law expressly provides that it "shall not apply" to a situation such as we have in this case. It necessarily follows that defendant could not be sentenced for longer than one year (Penal Law, §§ 600, 1937). Hence he has been detained without warrant in law since on or about February 1, 1957.
We have very frequently held expressly or impliedly that the legality of a sentence may be challenged by a writ of habeas corpus (People ex rel. Prosser v. Martin, 306 N.Y. 710; People ex rel. Carollo v. Brophy, 294 N.Y. 540, 542; People ex rel. Gordon v. Ashworth, supra; People ex rel. Ravalli v. Jackson, 276 App. Div. 810, motion for leave to appeal denied 300 N.Y. 763; People ex rel. Tweed v. Liscomb, 60 N.Y. 559, 591-592). As we said in People ex rel. Carollo v. Brophy (supra, p. 542), "We do not agree with the Attorney-General's assertion that the relator may not invoke the writ of habeas corpus to challenge a sentence which, according to relator's claim, exceeds statutory limits. If the relator's sentence is for a term longer than authorized by statute it is not a judgment of a court of competent jurisdiction even though the sentencing court had power to try the offense and fix the penalty. [Citing cases.]" (Emphasis supplied.) (See, also, People ex rel. Harrison v. Jackson, 298 N.Y. 219, where the availability of habeas corpus is discussed by CONWAY, J., p. 224, FULD, J., p. 226, and DESMOND, J., p. 233.)
The case of Matter of Morhous v. New York Supreme Court (293 N.Y. 131), relied on by the Appellate Division, is in nowise *69 to the contrary. There the defendant was tried and sentenced by a court having jurisdiction of the person and the subject matter of the crime. Defendant argued that the judgment of conviction obtained was invalid because, among other reasons, perjured testimony was used by the prosecution and testimony in his favor was suppressed. We stated that habeas corpus was not available to try those "converted questions of fact". Here the facts are undisputed. A further distinction between that case and the case before us is pointed out by our citation of the Morhous case in Matter of Hogan v. New York Supreme Court (295 N.Y. 92), where we said (p. 97): "The writ of habeas corpus they cannot use, since their convictions were by a court which had jurisdiction of their persons and of the crimes they were charged with, and power to declare the particular sentences meted out to them" (emphasis supplied). In the instant case, the County Judge did not have the statutory authority to impose an indeterminate sentence in the light of his affirmative finding as to defendant's unreformability.
Our statement in People v. Thompson (supra, p. 431)  "decision of whether the offender is mentally or physically incapable of being substantially benefited is left to the court. That question the court must decide before imposing sentence, but error in its decision would not render a sentence void for lack of jurisdiction"  does not militate against the decision that habeas corpus is available here. Immediately following the above statement we said: "If the original sentence was within the jurisdiction of the court, then the court had no power thereafter to treat it as void and to impose a new sentence." Thus it is clear that in the Thompson case the opinion meant to indicate that an erroneous resolution of the facts as to a defendant's reformability would not render a sentence void; but it did not state that a sentence which a court had no power to impose because of its findings as to reformability was valid.
Defendant could not, in this proceeding, challenge the sufficiency of the evidence supporting the Trial Judge's determination as to his reformability, but that he does not attempt to do. He only argues that in view of the affirmative findings, which he accepts, the trial court had no power to impose the sentence, and with this we agree.
*70The fact that a defendant may not have appealed does not deprive him of the right to test the legality of a sentence the court had no power to impose. In this case the defendant was sentenced to the very institution to which he could have been committed by virtue of a legal sentence under sections 600 and 1937 of the Penal Law. He might have been released at the end of a year, in which event no harm would have been done him. He was unlawfully restrained of his liberty only when he was detained beyond that period, and thus was entitled to institute the present proceedings.
The orders of the Appellate Division and Special Term should be reversed and the writ sustained.
Order affirmed.
