The writ of habeas corpus does not take the place of an appeal. It is a civil proceeding providing a remedy for one who is wrongfully deprived of his liberty.
Upon a conviction for vagrancy, the Municipal Court of the City of Klamath Falls is empowered to impose a sentence of not more than 50 days, or a fine of not to exceed $100, or both such fine and imprisonment. The Municipal Court did pronounce judgment upon the petitioner, imposing upon him a penalty of 25 days in jail and a fine of $100. Before the petitioner had served his jail sentence of 25 days, lawfully passed, he instituted this proceeding.
While there is some conflict among the authorities of other states, it is well settled in this state, and supported by the great weight of authority in other jurisdictions, that an excessive sentence is valid as to that part of it which is authorized by law, and is void only as to the excess, especially whenever the valid *261portion of the judgment is separable from the excessive.
“In accordance with this view, habeas corpus will not lie to discharge a prisoner held under an excessive sentence before he has served or satisfied the authorized part of it. * * But after the authorized part has been served or satisfied, further detention is illegal, and relief may be had by habeas corpus.” 29 C. J. 59, 60.
To the same effect is Ex parte Foster, 69 Or. 319 (138 Pac. 849).
By the provisions of the charter and ordinance of the City of Klamath Falls, and by virtue of Oregon Laws, § 2480, the following section of our Code is applicable to the case at bar:
“A judgment that the defendant pay a fine must also direct that he be imprisoned in the county jail until the fine be satisfied, specifying the extent of the imprisonment, which cannot exceed one day for every two dollars of the fine; and in case the entry of judgment should omit to direct the imprisonment and the extent thereof, the judgment to pay the fine shall operate to authorize and require the imprisonment of the defendant until the fine is satisfied at the rate above mentioned.” Or.‘L., § 1577.
While the judgment entered by the court failed to specify that the defendant should be imprisoned upon making default in the payment of the fine, the law supplies the deficiency, and the corrected commitment contained in the answer made by the defendant in this proceeding is sufficient.
The imprisonment arising from the defendant’s failure to pay the fine is deemed in law not a punishment for the crime, but as a means of enforcing the payment thereof: State v. Sheppard, 15 Or. 598 (16 Pac. 483); Ex parte McGee, 33 Or. 165 (54 Pac. 1091).
*262It is a general rule that a defendant may be committed for default in the payment of a fine, and such imprisonment is not contrary to Article I, Section 19, of the Constitution, providing that—
“There shall be no imprisonment for debt except in case of fraud or absconding debtors.”
See 8 Ency. of Plead. & Prac., 977; 25 C. J. 1159.
The contention of the petitioner here is similar to the position taken by the appellant in Ex parte McGee, 33 Or. 165 (54 Pac. 1091). In that case the defendant was convicted, in the Municipal Court of the City of Portland, of disorderly conduct, and was sentenced to pay a fine of $200, and, in default of such payment it was ordered that he be committed to the city prison for 100 days. It was argued in that case that because of a provision in the city charter limiting the power of imprisonment by the Municipal Court to ninety days, the commitment of the accused for 100 days was in violation of that regulation. The court said:
“We have anticipated this proposition somewhat by previous considerations. State v. Sheppard, 15 Or. 598 (16 Pac. 483) * * . The imprisonment is merely a prescribed mode of enforcing the payment of the fine, and, as we have seen, constitutes a step in the Code of Criminal Procedure to be pursued in all cases involving the imposition of a fine. The punishment permitted by the charter and fixed by the ordinance is imprisonment or fine, or both. All beyond is mere mode or manner of enforcement. The first can only be satisfied by serving out the prescribed term in prison, while the latter may be satisfied by payment of the fine imposed; but for the coercion of that payment the statute has prescribed a mode of procedure, which is to commit the accused to prison for a term not exceeding one day for every $2.00 of the fine. The mode and manner of enforcing the pun*263ishment should not be confounded with the punishment itself, or regarded as a part of it; and, if this obvious distinction is kept in view, the power of the court to direct imprisonment under the statutory regulations for the coercion of the payment of the fine becomes clear and incontrovertible. ’ ’
The Circuit Court’s ruling denies to the municipal governments of this state the right to protect themselves against vagrancy by ordinance. The court below erroneously held that Sections 2086 — 1 and 2086 — 2 of our state statute, defining vagrancy, prescribing punishment therefor, and providing the jurisdiction for the prosecution thereof, exclude municipalities from enacting legislation such as Ordinance No. 259 of the City of Klamath Falls denouncing vagrancy as an offense against the municipality. The court’s ruling was based upon the theory that the city ordinance conflicted with the state statute and was prohibited by the Home Rule Amendment: Art. XI, § 2, Const. An examination of the statute and the ordinance will show that they are not in conflict, but in perfect harmony. Every act constituting vagrancy under the city ordinance is likewise deemed vagrancy by the state statute, and vice versa. The city ordinance is a duplicate of the state statute, except that the penalty prescribed by the ordinance is smaller than that prescribed by statute. It was not the intention of the legislative assembly, by the enactment of the statute against vagrancy, to occupy the whole field of legislation upon that subject.
The constitutional provision prohibits a municipality from enacting legislation making that lawful which the state has denounced as a crime. The amendment strikes at conflicting laws, not at acts that are in harmony.
*264 The state statute defining and denouncing the crime of vagrancy commits to the Circuit and Justice Courts exclusive' jurisdiction in the matter of the prosecution of the offended laws of the State of Oregon. But that statute does not contemplate the exclusion of municipalities from the enactment of ordinances defining and punishing the same acts as offenses against the peace and order of such municipality. Similar questions have been before this court a number of times, and it is uniformly held that the mere fact that an offense is made punishable by state statute does not prevent a city from legislating on the same subject; or, when an act is defined as an offense against the laws of the city, the state is not excluded from legislating upon the same subject. It is well settled that the same act may constitute an offense against the state and a municipality: State v. Sly, 4 Or. 277; State v. Bergman, 6 Or. 341; Wong v. Astoria, 13 Or. 538 (11 Pac. 295); State v. Ayers, .49 Or. 61 (88 Pac. 653, 124 Am. St. Rep. 1036, 10 L. R. A. (N. S.) 992); State v. Bay, 53 Or. 241 (99 Pac. 939); State v. Cook, 53 Or. 243 (99 Pac. 940); State v. Gardner, 53 Or. 244 (99 Pac. 940); State v. Nasberg, 53 Or. 244 (99 Pac. 940); State v. Short, 53 Or. 245 (99 Pac. 1043); State v. Ferry, 53 Or. 247 (99 Pac. 1044); United States v. Lanza, 260 U. S. 377 (67 L. Ed. 314, 43 Sup. Ct. Rep. 141); notes, 13 Ann. Cas. 799; Ann. Cas. 1912D, 677.
In the case of Portland v. Parker, 69 Or. 271 (138 Pac. 852), it was decided that the state law defining vagrancy did not conflict with the ordinance of the City of Portland. In that case this court, speaking through Mr. Justice McBride, said:
“The statute of 1911 makes any person guilty of violent, riotous or disorderly conduct, or of using *265abusive or obscene language in any public place, street or highway, whereby the peace and quiet of the neighborhood is disturbed, a vagrant, and, if the contention of the defendant is upheld, takes away from the city authorities the power to punish that class of offenses most frequently the subject of police supervision in the cities. There is nothing in the city ordinance that conflicts with the state law except that the punishment upon conviction in the municipal court may be somewhat lighter than upon conviction in the state court. But, from the very earliest judicial history of the state, the law has provided that persons convicted in justices’ courts of assaults and other like offenses may be punished by a fine, or by a small fine and imprisonment, while, if convicted of a like° affair in the circuit courts, the punishment is much greater. ’ ’
Notwithstanding the failure of the applicant for writ of habeas corpus to appear in this court, we have given his petition the most careful consideration.
The order of the Circuit Court is reversed and set aside. Reversed and Set Aside.
McBride, C. J., and Bean and McCourt, JJ., concur.