dissenting.—Application for writ of habeas corpus.
The only inquiry to be made herein is, whether the court had jurisdiction to imprison the petitioner for a contempt in the case before us.
The petitioner is held to be in contempt for refusing to obey a judgment of the Superior Court of the county of Alameda, rendered and given in the case of People ex rel. Daniels against the petitioner.
Unless the judgment is void, the court had jurisdiction, and the imprisonment for contempt is valid.
The inquiry there relates to the judgment rendered.
This judgment was rendered in a case in which it was •.alleged that Daniels was entitled to an office, that of police judge of the city of Oakland, which had been usurped by Henshaw, the petitioner here. It is urged here that the office must exist to be usurped; that there can be no usurpation of an office which does not exist, and if the office does not exist, there is no jurisdiction in the court to inquire into its usurpation and render any judgment in favor of the plaintiff'against defendant.
If the office did not exist in regard to which the suit *499was brought, we cannot conceive how there can be any jurisdiction in the court to enter judgment against any one usurping it.
An office can only be created by the constitution or some valid statute passed by the legislature. Then the existence or non-existence of an office is a question of law, not of fact. Its existence depends on law, either constitutional or statutory. If no law can be found showing its creation, it cannot exist.
To empower a court to render a valid judgment, it must have jurisdiction of the res where it is a cause in rem, or of the subject-matter and parties when it is a cause inter partes.
If there is no jurisdiction of the parties, the judgment is void, though it may have jurisdiction of the subject-matter. If there is no jurisdiction of the subject-matter, the judgment is also a nullity, though the court may have had jurisdiction of the parties.
If no res exists, there can be no jurisdiction in a cause in rem, and a judgment pronounced in such cause would be void. If a ship is proceeded against by libel in an admiralty court in a case appropriate for such proceeding, there would be no jurisdiction if there was no ship. If there was no subject-matter in a cause inter partes, we cannot see any ground of jurisdiction. If an action of ejectment is brought in a court in this state to recover a parcel of land situate in the state of Nevada, we cannot see that there could be any jurisdiction, or any judgment pronounced for its recovery which would not be void. If the parties are myths, fictitious persons, a judgment pronounced in an action between them would be void for want of jurisdiction. If the court had jurisdiction to inquire, the judgment in that case would be void. A court can have no power to pronounce judgment for or against a non-existent person. Such was the point directly in judicature in Sampeyreac and Stewart v. United States, 7 Pet. 233. In that case it was held *500that a decree in favor of a fictitious person (Sampeyreac) was a nullity. The case cited was this: Under an act of Congress purporting to authorize it, a bill of review was filed in the Superior Court of the territory of Arkansas to impeach a decree previously rendered in the same court in favor of the complainant in the cause of Sampeyreac v. United States. The decree had been rendered in favor of Sampeyreac and against the United States, for a tract of land. The decree on review was held void, for the reason that Sampeyreac was not a real person. The court said: “ The original decree in this case was a mere nullity; it gave no right to any one.” And this was so held, for the reason that the complainant was a fictitious and not a real person.
If a court, to render a valid decree inter partes, must have jurisdiction, both of the subject-matter and the parties, how can such jurisdiction exist if there is no subject-matter or no parties?
Let it be admitted that a court has jurisdiction to inquire whether there is an existent subject-matter: as soon as it finds there is none such, its jurisdiction to enter a decree for its recovery against any person is at an end. It has no more power than it has when a suit is brought to recover a piece of land, and it gives judgment against the defendant for a horse or an office. That such a judgment would be void, we cannot see that there can be any doubt. If such jurisdiction exists, it can only be from a determination of the court that such subject-matter exists. And it is too well settled to be now debated that a court cannot, by holding that it has jurisdiction when it has none, invest itself with jurisdiction. The jurisdiction of a court must be shown by the record of the case on which it passes. The jurisdiction of the court is always open to inquiry in any court, in which the record of the action is put in evidence. It is so open in the same court, or in any other court having *501jurisdiction of the case before it, and can always be called in question collaterally. A court, in rendering a judgment, always, either expressly or impliedly, affirms that it has jurisdiction. It may enter such judgment, and at any time, on its own motion, re-examine the cause, and vacate the judgment for lack of jurisdiction. When the record of a judgment is offered in evidence in another court, the jurisdiction is a matter of law; and if, upon an examination of the record, it appears that upon the application of the law that the court rendering the judgment had no jurisdiction, it can declare such judgment to be void. It is in effect always void,—-void ab initio. The judgment is a nullity. It never had life, and was always naught. It gave no right to any one, and none could be acquired under it.
In the action of People etc. ex rel. Daniels v. Henshaw, the complaint is in these words: —
“ 1. That on the first day of January, A. D. 1885, the city of Oakland was, thence hitherto has been, and now is, a municipal corporation, created, organized, and existing under the Jaws of the state of California.
’ “ 2. That among other offices of said municipal corporation, created by statute and provided by its charter or organic act for the government of said city, is the office of police judge, and the charter of said city provides and requires that there be a municipal election held in said city on the second Monday of March, A. D. 1886, for the election, among municipal officers, of a police judge, for the term of two years next succeeding such election.
“ 3. That on the second Monday of March, A. D. 1886, to wit, on the eighth day of March, A. D. 1886, a municipal and charter election was duly held in said city for the election of, among other municipal officers, a police judge, for the term of two years next succeeding such election.
“ 4. That at said election so held in said city one S. F. Daniels received the greatest number of votes cast for *502police judge of the city of Oakland by the qualified electors of said city, and thereafter, to wit, on the twenty-ninth day of March, A. D. 1886, and within ten days after receiving a certificate of his election, he took the oath of office and presented to the city council of said city a bond, good and sufficient in form and as required by law, with two good and sufficient sureties in the penal sum of five thousand dollars, as and for his official bond as police judge of the city of Oakland for the term of two years next succeeding his said election.
“ 5. That on said second Monday of March, A. D. 1886, and for more than one year prior thereto, the said S. F. Daniels was, thence hitherto has been, and now is, a resident of the city of Oakland, Alameda County, state of California, and during all of said time he has been and now is, an attorney and counselor at law, eligible and qualified to fill and hold the office and discharge the duties of police judge of said city.
“ 6> That on the seventh day of April, A. D. 1886, the defendant, F. W. Henshaw, usurped and intruded into the office of police judge of said city, and ever since said day he has usurped and intruded into said office, and withheld the same from the said S. F. Daniels.
“Wherefore the plaintiff demands judgment,—
“ 1. That the defendant is not entitled to the office of police judge of the city of Oakland, and that he be ousted therefrom.
“ 2. That the said S. F. Daniels is entitled to said office of police judge of the city of Oakland, and that he be let and put into possession of said office, and that he have his costs herein, and such other and further relief in the premises as shall seem proper.”
The answer of Henshaw is as follows:—
“ The above-named defendant, for answer in his behalf to the pretended cause of action set forth in the complaint of plaintiff above-named herein filed, —
*503“1. Admits that the allegations contained in paragraph 1 of said complaint are true.
“2. Denies that among other offices of said municipal corporation created by statute and provided for by its charter or organic act, for the government of said city, or at all, is the office of police judge. Denies that the charter of said city provides and requires, or provides or requires, that there be a municipal election held in said city on the second day of March, A. D. 1886, or at any time, or at all, for the election, among other municipal officers, of a police judge, for the term of two years next succeeding such election, or for any term at all.
“3. Denies that on the second Monday of March, A. D. 1886, or at any time, or at all, a municipal and charter election, or municipal or charter election, was duly or otherwise held in said city for the election of, among other municipal officers, a police judge for the term of two years next succeeding such election, or for any term, or at all.
“4. Defendant has no knowledge, information, or belief sufficient to enable defendant to answer the allegations contained in paragraph 4 of said complaint, and therefore denies that at said election so held in said city one S. F. Daniels received the greatest number of votes, or any number of votes, for police judge of the city of Oakland by the qualified electors of said city, and that thereafter, to wit, on the twenty-ninth day of March, A. D. 1886, or at any time, or at all, or within ten days after receiving a certificate of his election, he took the oath of office, and presented to the city council of said city a bond, good and sufficient in form, and as required by law, with two good and sufficient sureties, in the penal sum of five thousand dollars, as and for his official bond as police judge of the city of Oakland for the term of two years next succeeding his said election, or for any term, or at all.
*504“ 5. Answering paragraph 5 of said complaint, defendant admits that the allegations contained therein are true, assuming that the word 'qualified' therein used is intended to convey its ordinary and usual meaning.
“6. Denies that on the seventh day of April, A. D. 1886, or ever, or at all, this defendant usurped and intruded, or usurped or intruded, into the office of police judge of said city, and ever since said day, or ever, or at all, he has usurped and intruded, or usurped or intruded, into said office, and withholds the same, or withholds the same, from said S. F. Daniels.
"Wherefore, having fully answered, defendant prays judgment, that plaintiff be denied the judgment demanded in his said complaint, and that he take nothing by this action, and that defendant have judgment against plaintiff for defendant’s costs herein.”
The controversy in the action was as to the office of police judge of the city of Oakland. Is there any such office? If there is, the statutes will show it. There is no such office mentioned in the constitution. We must then find it, if it exists, in some statute.
It may be conceded that there was, under the act of March 10, 1866, an office of police judge for the city of Oakland. (See Stats. 1865-66, p. 193, secs. 1, 2.) In fact, there was such an office created by the second section of the act. The first section created a Police Court for the city named. The police judge was to be elected at the charter election of said city, held on the first Monday in March, 1867, who was to hold office for two years, and until his successor shall be elected and qualified. In the following sections of the act the jurisdiction of the Police Court, as established, may be found, and other provisions made in regard to the court.
Let it be conceded that other statutes existed by which the office mentioned existed.
On the 18th of March, 1885, a statute was passed entitled, “An act to provide for Police Courts in cities *505having thirty thousand and under one hundred thousand inhabitants, and to provide for officers thereof.”
The first section of the act is in these words: “The judicial power of every city having thirty thousand and under one hundred thousand inhabitants shall be vested in a Police Court, to be held therein by the city justices, or one of them, to be designated by the mayor; but either of said justices may hold such court without such designation; and it is hereby made the duty of said city justices, in addition to the duties now required of them by law, to hold said Police Court.”
The act consists of fifteen sections. It proceeds by the second and third sections to define and settle the jurisdiction of the Police Court established by the first section; by the fourth, to declare who shall discharge the duties of said court in case of the disability of the justice appointed to hold the court under the first section. By thé fifth section, the power of the justice of the court is declared and conferred. The sixth section provides for a clerk of the court, to be appointed by the city council, and defines his duties, and provides for his salary. Section 7 provides for the disposition of the fines, and other moneys collected on behalf of the city in the court, and for a report to the city council each month of all bills for fees and costs due the court. Section 8 provides for rooms for the court and dockets. The ninth section provides that the court shall be always open except on non-judicial days, and then for such purposes as by law are permitted or required of the other courts of the state. Appeals are provided for by section 10; section 11, a place of imprisonment and a place of labor; section 12, for a seal of the court, to be furnished by the city; section 13, for a report of the city council by the city justices on the first Monday of each month of all the cases, civil and criminal, in which the city has an interest, or which are required to be entered in the city civil docket or the city criminal docket, etc. *506The next section (14) provides that certified transcripts made by the clerk shall be evidence, etc., and that all warrants, and other process issued out of said court, and all acts done by said court, and certified under its seal," shall have the same force and validity in any part of the state as though issued or done by any court of record of this state. Section 15 provides that this act shall go into effect upon the expiration of the term of office of-the present police judge of said cities, or when a vacancy occurs therein.
That this act of 1885 repeals former acts in relation to a police judge in the city of Oakland, we think there cannot be any doubt. The former acts cannot stand with the act of 1885. There is such a repugnance that they cannot stand together. The former act or acts provided for a police judge to be elected by the electors of the city at a certain election. This act of 1885 provides that the judicial power shall be vested in a Police Court to be held in the city by the city justices, or one of them, to be designated by the mayor. The city justices are elected under section 103 of the Code of Civil Procedure-(which section was held constitutional in Bishop v. City of Oakland, 58 Cal. 572), and it is made the duty of the mayor by the act of 1885 to designate one of such justices to hold the Police Court. The office of police judge to be elected, as before pointed out, ceases, under the act of 1885, upon the expiration of -the term of the incumbent in office at the time the act of 1885 was passed, or when a vacancy may occur in such office. These provisions show that the former acts creating the office of police judge- are repealed by the act of 1885. The repeal is shown by its being clearly a revision of the former acts on the subject of Police Courts in the class of cities referred to. (See Christy v. Sacramento, 39 Cal. 3; Ex parte Smith, 40 Cal. 419; Estate of Wixom, 35 Cal. 320; People v. Burt, 43 Cal. 560.)
That the act of 1885 is constitutional is clear.' *507The power over this subject is amply confirmed by sections 1 and 13 of article 6 of the constitution. It would seem that, under section 1 of article 6, such a court as that established by the act of 1885 may be created by a special law for each city. If a general law is required to create such a law, the act of 1885 is a general law. It is general because it applies to a class of cities. (Thompson v. Ashworth, ante, p. 73.) It makes no difference in this regard that Oakland is the only city belonging to the class having thirty thousand and less than one hundred thousand inhabitants. There is certainly another (Los Angeles) since the act of 1885 was passed, and there will soon be others.
It may be remarked here that the Police Courts constitute a part of the courts of the state, and the police judge part of the judiciary, and section 6 of article 11 of the constitution has no reference to them. (McGrew v. Mayor of San Jose, 55 Cal. 611; People v. Ransom, 58 Cal. 560; Bishop v. City of Oakland, 58 Cal. 572; Jenks v. City of Oakland, 58 Cal. 578; Coggins v. Sacramento, 59 Cal. 599; Const., art. 6, sec. 1.)
The act of 1885, then, repeals all other acts in relation to the office of police judge of the city of Oakland, does away with such office, and is a valid and constitutional act.
In this view, it follows that the judgment of the court below, in adjudging that Daniels is entitled to the office of police judge, is clearly erroneous.
Is it also void? For a judgment can also be void as well as erroneous. (Ex parte Lange, 18 Wall. 163.) If merely erroneous, it is not void. But if void it is also erroneous, and will be reversed on appeal.
In accordance with the views expressed in a foregoing part of this opinion, the judgment is void for the reason that it adjudges a person entitled to an office which does not exist. A court can no more render a valid judgment for the recovery of an office which does not exist *508than it can for a non-existent parcel of land, or a nonexistent horse.
Can a person be imprisoned for refusing to obey a void judgment? We cannot perceive how this can be,— a void judgment is a nullity. It can confer no rights on any one, nor deprive any one of a right. An imprisonment under a void judgment is an arbitrary one, beyond the power of any court or judge. It is in no sense within their jurisdiction. To render a judgment of imprisonment is an assumption of power authorized neither by the constitution, or law, or justice. The officer who attempts to execute such a judgment is a trespasser, and may be lawfully resisted by any one against whom the process in his hands runs. It cannot he lawful, unless the arbitrary edict of a court or judge can make that lawful which is contrary to all law. The above views are, in our opinion, sustained by the decided cases.
In Batchelder v. Moore, 42 Cal. 415, there was no jurisdiction of the subject-matter. Calderwood was not a party to the action of Batchelder v. Moore, supra, in which judgment had been rendered, and was not dispossessed under it. There was then no jurisdiction of the subject-matter.
In Ex parte Kearny, 55 Cal. 212, there was no offense charged against Kearny; hence there was no subject-matter of which the court had or could take jurisdiction. The court held in this case, as correctly stated in the head-notes, as follows: “ Where it affirmatively appears from the record of the proceedings of an inferior court that a person was tried and sentenced to be punished for an act which is not a crime, the judgment is absolutely void, and a person in custody under such a judgment will be discharged on habeas corpus.
“ To constitute an offense under subdivision 3, section 38, of order No. 697, as amended by order No. 1196 of the city and county of San Francisco, which provides *509that ‘ No person shall address to another, or utter in the presence of another, any words .... having a tendency to create a breach of the peace/ the words must be uttered in the presence of the person whom they tend to provoke to such breach of the peace.”
The same is true of Ex parte Corryell, 22 Cal. 179. Corryell had been charged with that which was no crime, and therefore he was discharged. Ex parte French, 52 Cal. 606, goes on the same ground. The ordinance under which he was convicted was void, therefore the judgment under it was void.
Ex parte Siebold, 100 U. S. 371, is also an authority.
In that case it was alleged that the act under which the imprisonment was adjudged was unconstitutional. The Supreme Court of the United States held that the act was constitutional, and remanded the applicant. The court held that if the act was unconstitutional, the applicant was entitled to his discharge. (See opinion of court in Ex parte Siebold, 100 U. S. 376, 377.) Two of the justices (Field and Clifford) dissented, holding the law unconstitutional, and were on that ground in favor of discharging the applicant. (See 100 U. S. 404.) The same rulings were made in Ex parte Virginia, 100 U. S. 339, and in Ex parte Clarke, 100 U. S. 399, as in Siebold’s case. In Ex parte Siebold, supra, the court cited Rex v. Suddis, 1 East, 306; Bac. Abr., tit. Habeas Corpus, B, 10; Bushel’s Case, T. Jones, 13; S. C., Vaughan, 135; S. C., 6 Howell’s State Trials, 999. Bushel’s Case, which was cited approvingly by the court in Siebold’s case, is thus stated in its opinion: “ There, twelve jurymen had been convicted in the Oyer and Terminer for rendering a verdict (against the charge of the court) acquitting William Penn and others, who were charged with meeting in conventicle. Being imprisoned for refusing to pay their fines, they applied to the Court of Common Pleas for a habeas corpus; and though the court, having no jurisdiction in criminal matters, hesitated to grant the writ, yet, *510having granted it, they discharged the prisoners, on the ground that their conviction was void, inasmuch as jurymen cannot be indicted for rendering any verdict they choose”; thus holding that the Court of Oyer and Terminer had no jurisdiction of the subject-matter. No offense had been committed by the jurors; therefore there was no subject-matter. Ex parte Jackson, 96 U. S. 727, accords.
In Zeehandelaar’s Case, 71 Cal. 238, this court held that a Superior Court had no jurisdiction to adjudge in contempt, and imprison a witness for refusing to answer a question which was immaterial to any issue in the case, and discharged the petitioner.
In all these cases, the court had jurisdiction of the parties. In cases where the court had jurisdiction of the subject-matter, the applicant, for the writ was remanded, and where it had no such jurisdiction, the applicant was discharged. (See also Hummel and Bishoff’s Case, 9 Watts, 416; Commonwealth v. Newton, 1 Grant Cas. 453; People v. Kelly, 24 N. Y. 74; In re Fernandez, 10 Com. B., N. S., 32; Burnham v. Morrissey, 14 Gray, 226.)
It can make no difference in this case, conceding that the court below held the act of 1885 unconstitutional,, or that the former acts had not been repealed by the act of 1885, so far as relates to the office of police judge. • The foregoing are questions of law, which go to the jurisdiction of the court.
If the act of 1885 is constitutional, and lawfully repealed the former acts, the court below had no jurisdiction to render the judgment herein mentioned, adjudging Daniels entitled to the office as against Henshaw, and ousting Henshaw therefrom.
The judgment being void, the commitment for contempt in refusing to obey it is also void, as being beyond the power of the court to render it.
In fact, the case should have been dismissed on an inspection of the complaint. It sets forth no title to an *511existing office; in fact, shows want of title. The affidavit of Daniels was entirely insufficient to confer any power on the court to punish for contempt.
The conclusion above reached applies as well to judgment in a civil as in a criminal action. There can be no punishment by a court under a void judgment in either case.
The applicant for the writ (Henshaw) should, in my opinion, be discharged from custody.