
7 N.Y.2d 29 (1959)
The People of the State of New York ex rel. Antonio Vanilla, Respondent,
v.
Wilfred L. Denno, as Warden of Sing Sing Prison, et al., Appellants.
Court of Appeals of the State of New York.
Argued November 17, 1959
Decided November 25, 1959.
Louis J. Lefkowitz, Attorney-General (Paxton Blair and Joseph J. Rose of counsel), for appellants.
Samuel Shapiro and Max Schultz for respondent.
Chief Judge CONWAY and Judges DESMOND, DYE, FROESSEL, VAN VOORHIS and BURKE concur.
*31FULD, J.
The relator, now over 65 years old, was found guilty in 1924 of robbery, committed in 1920, and was sentenced to imprisonment for a definite term of 40 years as a second felony offender. In the ordinary course, his term would have expired on January 26, 1964. On July 1, 1940, after more than 16 years of continuous imprisonment, apparently without a single prison rule infraction, the authorities at Sing Sing Prison determined that the relator was entitled to "commutation" *32 of 17 years, 11 months and 9 days for good behavior and "compensation" of 5 years, 6 months and 10 days for labor performed and that, by virtue of time already served and such earned reduction, he had fully served his term and recommended to the Governor that the sentence be reduced accordingly. Several weeks later, the Governor, following the recommendation, allowed the commutation and reduced the sentence. The release was conditioned upon the relator's being "subject to the jurisdiction and control" of the Parole Board, the relator agreeing to such condition in an instrument signed on July 26, and, on August 7, 1940, he was released from prison on parole.
The relator remained at liberty for more than 17 years and, so far as appears, never had any brushes with the law. However, on September 16, 1957, he was taken into custody for violation of parole and a month later returned to Sing Sing. The Parole Board declared him delinquent as of the latter date and, after a hearing of charges, decided to hold the relator for a period of two years  until September, 1959  for "reconsideration only".
In May of 1958, the relator instituted this habeas corpus proceeding. It was his claim that, if he were credited with the "compensation"  of 5 years, 6 months and 10 days  for labor performed in prison prior to his release in August, 1940, and with the "compensation" earned since his reimprisonment in September, 1957, he had fully completed his 40-year term and was entitled to his release by habeas corpus. The court at Special Term agreed with the position taken by the relator and directed his discharge. The Appellate Division affirmed, although not unanimously, and the People appeal to us as of right.
Concededly, if the relator is entitled to be credited with compensation for labor performed, he is entitled to his release. Thus, we must decide whether he became entitled to such compensation as of right when it was allowed to him in August of 1940 upon his release from prison on parole.
Prisoners had long been allowed a "commutation" of sentence for good behavior, its grant or allowance resting in discretion and being a matter of grace. "Compensation" for labor performed while in prison, however, was quite different, both in origin, purpose and method of computation. The concept *33 came into our law in the year 1916 (L. 1916, ch. 358). It was only reasonable that the convicts who perform labor while in prison receive a consideration for such labor. This consideration could have taken the form of cash, but it was soon discovered  to cull from a brief submitted by the Attorney-General in a case before the courts shortly after the 1916 amendment (People ex rel. Roache v. Carter, 181 App. Div. 833)  that "the method of money payment did not procure the diligence looked for in convict industries or supply the normal output expected" and, accordingly, the Legislature provided for this so-called "compensation".
At any rate, subdivision 3 of section 230 of the Prison Law, by virtue of the 1916 enactment, prescribed that a definite sentence convict might earn a reduction of his term by "compensation for efficient and willing performance of duties assigned to him" of 10 days in each 30 days in which such duties are performed; provision was also made for an allowance of "commutation" for "good conduct", progressively, up to seven months a year. The statute further provided that the Prison Board in each prison was to have the power to recommend that compensation be withheld as a punishment for offenses against the discipline of the prison. Significantly, though, it was explicitly stated that "Compensation credited to a convict in the first instance, in his account, by the agent and warden, as provided in section two hundred and thirty, shall stand as the compensation allowed, unless withheld wholly or partly by the board as punishment, as above provided." There was no corresponding provision as to commutation. From these provisions and from the others in force from 1916 to 1926, it seems clear that "compensation" once earned and credited in the convict's "account" was irrevocable and automatically reduced the convict's sentence  except in cases (1) where he violated prison rules (Prison Law, § 236), (2) where he escaped from prison (§ 238), and (3) where he was convicted of a felony later committed (§ 243).
Quite obviously, a distinction existed, under the 1916 statute  the one in force when the relator was sentenced  between commutation and compensation. In the Roache case (181 App. Div. 833, supra), decided in 1918, the court recognized that the convict was to be unconditionally discharged on the date when *34 the time actually served plus "the compensatory days" equaled the term imposed (p. 835): "Where, then," asked the court, "is the question? Is it not plain that, if the convict is allowed ten days in every thirty, the time will come when his days actually served, with the compensatory days, will equal the limit of his service?" Under the statute as it read both in 1920, when the relator committed the crime of which he was later convicted, and in 1924, when he was sentenced, section 236 of the Prison Law provided that, while the Prison Board could withhold the compensation as punishment for dereliction of prison discipline, such compensation once credited amounted to a reduction of the sentence. It had the same effect as if the sentence had been pronounced for a lesser term, being the difference between the sentence pronounced and the amount credited as compensation. The State, through the Legislature, in effect, made a bargain with the prisoner that, if he would efficiently and willingly perform the duties assigned to him, his sentence would be reduced every 30 days and that, when he had served the amount of the reduced sentence, he would be entitled to his discharge. This was in the nature of a contract. Commutation, on the other hand, was simply a favor promised the prisoner which could be taken away in the event of misconduct. (See, e.g., People ex rel. Fershing v. Wilson, 174 Misc. 191, revd. on other grounds 259 App. Div. 957; see, also, People ex rel. Jackson v. Morhous, 286 App. Div. 939.)
The distinction between "compensation" and "commutation" continued, as noted above, at least until 1926. In that year, section 230 of the Prison Law was amended (L. 1926, ch. 736) and a distinction made between convicts whose crimes were committed before July 1, 1926, as to whom compensation as a right was preserved, and convicts whose crimes were committed after that date, as to whom there was to be no such compensation. (Cf. Matter of O'Neil v. Thayer, 154 Misc. 333, 337, affd. 245 App. Div. 349, affd. 270 N.Y. 521.) And in the later amendatory statutes, the Legislature made it clear, by express provisions (L. 1929, ch. 243, amdg. Prison Law, § 237; L. 1935, ch. 902, § 16; L. 1948, ch. 631), that the rights thus preserved to pre-1926 prisoners were not to be affected retroactively.
*35We are here concerned solely with a credit attributable to compensation for labor performed by a prisoner convicted of a crime committed before July 1, 1926.[1] That being so, section 230 of the old Prison Law applied and the rights thereunder acquired were not lost by the enactment of subsequent legislation or by the terms of the release agreement signed by him in July of 1940. In other words, the compensation of 5 years, 6 months and 10 days earned by, and credited to, the relator prior to his release on parole effected a reduction of his 40-year term to that extent. Since he did not violate any prison rules (Prison Law, § 236), did not escape from prison (§ 238) and was not convicted of a felony subsequently committed (§ 243), the compensation which he had earned may not be taken from him and, consequently, it follows that, as of July 7, 1958, when the writ of habeas corpus was sustained, he more than completed service of the 40-year term for which he had been imprisoned.
No decision of this court militates against our conclusion. In neither Vanilla v. Moran (298 N.Y. 796) nor People ex rel. Scarola v. Murphy (5 N Y 2d 979) was the question now before us considered. The first, wherein the present relator in 1946 brought an action for a declaratory judgment, decided only that Vanilla remained subject to the jurisdiction of the Parole Board following his release from Sing Sing Prison in 1940 and the Scarola case not only involved a crime committed after July 1, 1926, but had nothing to do with an attempt on the part of the authorities to take from a prisoner the credit for compensation already earned and credited.
The order appealed from should be affirmed.
Order affirmed.
NOTES
[1]  Since our decision is thus limited, it is hardly necessary to add that we are not to be taken as passing upon the rights of prisoners who committed crimes after July 1, 1926.
