This is an application for the discharge of the prisoner, under a writ of habeas corpus, from the state prison at San Quentin. The petition alleges that the petitioner “is detained, confined, restrained, and imprisoned by virtue of a judgment and commitment, which judgment and commitment attempt to imprison him for two years in said prison, and to impose a large fine, and order his further imprisonment in said prison in case he do not pay said fine for a long period of time, to wit, for one day for each dollar of said fine not paid; that the two years’ imprisonment ordered by said judgment and commitment have, by virtue of the credits accorded to him by law, and which have not been taken away from him, expired, and that he is now held and imprisoned in said prison at hard labor solely for the purpose of collecting such fine.”
The warden of the prison makes return that he is *305entitled to the custody of the petitioner, as such warden, by virtue of a judgment of conviction and commitment of said petitioner to said prison by the superior court of Merced County. The judgment and commitment are filed with and made part of the return. That part of the judgment, material to the question raised here, is, that the petitioner “be imprisoned in the state prison of the state of California at San Quentin for the term of two years, as a punishment for said crime, and that in addition thereto he pay a fine of two thousand dollars, and that he be imprisoned in the said state prison of said state until such fine be satisfied, said imprisonment not to exceed one day for each two dollars of such fine, and on the payment of such portion of said fine as shall not have been satisfied by imprisonment, at the rate prescribed, that is, one day for each two dollars thereof, that he be discharged from custody on account of said fine.”
The return does not controvert the facts alleged in the petition, that the petitioner has served the full term of imprisonment adjudged as a punishment, and that he is being held and imprisoned at hard labor solely for the purpose of collecting such fine.
It is claimed by counsel for the petitioner that the judgment, so far as it authorizes the imprisonment of the petitioner in the state prison until payment of the fine, is void:—
1. Because there is no law authorizing imprisonment in the state prison for said purpose.
2. Because it imposes hard labor as a part of the penalty in case the fine is not paid.
The judgment of the court is based upon section 245 of the Penal Code, which provides, as punishment for the crime of assault with a deadly weapon (the offense of which the petitioner was convicted), “imprisonment-in the state prison, or in a county jail, not exceeding two years, or by fine not exceeding five thousand dollars, *306or by both.” The court rendering the judgment evidently proceeded upon the theory that where imprisonment in the state prison was imposed as a part of the penalty, the imprisonment for the fine must be in the same prison.
We are not inclined to this view. It is provided generally that all persons committed by authority of law shall be confined in the common jails in the several counties. (Pen. Code, sec. 1597.)
Imprisonment in the state prison is provided as a part of the punishment only in case of the commission of a felony. (Pen. Code, sec. 17.) The whole scope of the law regulating such prisons must be held to provide only for prisoners convicted of felonies, and as a punishment therefor. (Stats. 1880, p. 67.)
The court below had no jurisdiction to impose hard labor as a part of the punishment. (Ex parte Kelley, 65 Cal. 154.)
Counsel for petitioner claims that this was the effect of the judgment here, for the reason that all persons imprisoned in the state prison are required to labor.
The act for the government of the prisons provides that “all convicts not employed on contracts may be employed by authority of the board of directors, .... in the performance of work for the state,” etc., and that such board “shall require of every able-bodied convict confined in the state prison as many hours of faithful labor, in each and every day during his imprisonment, as shall be prescribed by the rules and regulations of the prison.”
If the petitioner continued to be a “convict ” after his imprisonment as a punishment had expired, it was the duty of the officers of the prison to compel him to perform labor, and the effect of the judgment imprisoning him there until the payment of the fine was to impose that burden upon him. If he ceased to be a convict, and could only be confined without labor, there *307must be a class of prisoners in the state prison not contemplated by any law that has come to our notice, and the control and management of whom, therein, is nowhere provided for.
It is clear to us that so much of this judgment as provided for imprisonment in the state prison as a means of enforcing the payment of the fine was beyond the jurisdiction of the court, and void.
For the reasons given, the petitioner is entitled to his discharge, and it is so ordered.
McFarland, J., Sharpstein, J., and Beatty, C. J,, concurred.
Thornton, J., dissented.