By the Court,
Hawley, J.:The petitioner is held in custody by the sheriff of Ormsby County by virtue of a commitment issued from the justice’s court of Carson Township, which recites that petitioner had
*74been found “ guilty of the offense of playing at a game of chance for gain on the first day of the week, commonly called Lord’s day;” that petitioner was “fined in the sum of fifty dollars * * * and in default of payment thereof, that be be confined in the county jail,” etc., etc. The commitment is in proper form, and regular upon its face.
Petitioner claims that the court bad no jurisdiction because no public offense is “specified in the commitment.” This position is sought to be maintained upon the theory that section 3 of “An act to restrict gaming,” passed March 4, 1869 (Stats, of 1869, 119,) virtually repeals the law of 1861 (Stats, of 1861, 39,) for an alleged violation of which the petitioner was tried, found guilty and sentenced; and we are asked in this proceeding to decide that question.
At the threshold of the argument we called the attention of counsel to what we considered an insuperable objection - to any examination upon the point whether or not the law of 1861 bad been repealed, by stating that we did not think the question was properly before us, it appearing upon the face of the commitment that the justice’s court bad jurisdiction of the subject matter and of the person of petitioner; and requested authorities, if any could be found, where courts or judges bad under a writ of habeas corpus gone behind a judgment or commitment of a court of competent jurisdiction to determine whether or not its proceedings were illegal or erroneous. The statute provides that it shall be the duty of the judge before whom the writ is returnable, after a bearing, to remand the petitioner “if it shall appear that be is detained in custody by virtue of the final judgment or decree of any competent court of criminal jurisdiction, or of any process issued upon such judgment or decree, or in cases of contempt of court.” Stats, of 1862, 100, Sec. 19. We are not authorized to discharge petitioner unless the jurisdiction of the justice’s court has been exceeded or the commitment has been issued without authority of any judg*75ment, order or decree of any court, or any provision of law. Stats, of 1862, 100, Sec. 20; 1 Kent’s Com. 647.
Chancellor Kent says that “no inquiry is to be made into the legality of any process, judgment or decree * * * where the party is detained under the final decree or judgment of a competent court.” In Commonwealth v. Lecky, Gibson, C. J., said: “The habeas corpus is undoubtedly an immediate remedy for' every illegal imprisonment. But no imprisonment is illegal where the process is a justification of the officer; and process, whether by writ or warrant, is legal wherever it is not defective in the frame of it, and has issued in the ordinary course of justice from a court or magistrate having jurisdiction, of the subject matter.” 1 Watts, 67, and authorities there cited.
A habeas corpus is not a writ of error. It cannot be used to authorize the exercise of appellate jurisdiction. On a habeas corpus the judgment of an inferior court cannot be disregarded. We can only look at the record to see whether a judgment exists, and have no power to say whether it is right or wrong. It is conclusively presumed to be right until reversed; and when the imprisonment is under process, valid on its face, it will' be deemed prima facie legal, and if the petitioner fails to show a want of jurisdiction in the magistrate or court whence it emanated, his body must be remanded to custody. People v. Cavanaugh, 2 Parker Crim. R. 658; People v. McCormack, 4 Parker Crim. R. 18; People v. Cassels, 5 Hill, 167; Passmore Williamson's Case, 26 Penn. State, 17; Ex parte Toney, 11 Mo. 662; In re John O'Connor, 6 Wis. 290; Platt v. Harrison, 7 Iowa, 80; Ex parte Tobias Watkins, 8 Pet. 193; In re Theophilus C. Callicot, 8 Blatchford Circuit Court R. 89; Ex parte McCullough, 35 Cal. 100; Ex parte Murray, 43 Cal. 457.
In Ex parte Watkins, petitioner was detained in prison by virtue of a judgment of the circuit court of the United States rendered in a criminal prosecution carried on in that *76court. A copy of the indictment and judgment was annexed to the petition. The motion for discharge was founded on the allegation that the indictment charged no offense for which the prisoner was punishable in that court, or of which that court could take cognizance ; and it was consequently claimed that the proceedings were coram 11011 judice, and void. Marshall, C. J., in delivering the opinion of the court said, “ Can the court, upon this writ, look beyond the judgment,, and reexamine the charges on which it was rendered. A judgment, in its nature, concludes the subject on which it is rendered and pronounces the law of the case. The judgment of a court of record, whose jurisdiction is final, is as conclusive on all the world as the judgment of this Court would be. It is as conclusive on this Court as it is on other courts. It puts an end to inquiry concerning the fact, by deciding it. The counsel for the prisoner admit the application of these principles to a ease in which the indictment alleges a crime cognizable in the court by which the judgment was pronounced ; but they deny their application to a case in which the indictment charges an offense not punishable criminally according to the law of the land. But with what propriety can this Court look into the indictment? We have no power to examine the proceedings on a writ of error; and it would be strange, if, under color of a writ to liberate an individual from unlawful imprisonment, we could substantially reverse a judgment which the law has placed beyond our control. An imprisonment under a judgment cannot be unlawful, unless that judgment be an absolute nullity; and it is not a nullity if the court has general jurisdiction of the subject, although it should be erroneous. The circuit court * * is a court of record, having jurisdiction over criminal cases. * * * If the offense be punishable by law, that court is competent to inflict the punishment. * * * * To determine whether the offense charged .in the indictment be legally punishable or not, is *77among the most unquestionable of its powers and duties. The decision of this question is the exercise of jurisdiction, whether the judgment be for or against the prisoner. The judgment is equally binding in the one case as in the other ; and must remain in fiill force unless reversed regularly by a superior court capable of reversing it.” After reviewing numerous authorities the opinion concludes as follows: “Without looking into the indictments under which the prosecution against the petitioner was conducted, we are unanimously of opinion that the judgment of a court of general criminal jurisdiction justifies his imprisonment, and that the writ of habeas corpus ought not to be awarded.”
In Callicot’s case the petition alleged that petitioner was imprisoned under or by color of a sentence of the circuit court of the United States, and it was charged that such imprisonment was illegal ‘ ‘ for the reason that the law under which such sentence was imposed had been changed and repealed before said sentence was passed.” The court, upon the authority of Ex parte Watkins, refused to examine the question. “I find no case,” said Woodruff, J., “in which the supreme court have held any other doctrine, and no case is cited to me in which that court or any court of the United States has countenanced the idea that a judge can, under or by virtue of the writ of habeas corpus, practically reverse a judgment of the circuit court for error and discharge a prisoner from its sentence.”
In Platt v. Harrison, the petitioner was convicted before a police magistrate of the offense of selling goods, etc., without a license, under and by virtue of a city ordinance, which he claimed the city council had no power or authority to pass. The supreme court refused to examine the question whether or not the city council had any authority to pass the ordinance. Wright, C. J., said: “ The police magistrate is conservator of the peace; is invested with exclusive original jurisdiction for the violation of the city ordinances; *78and with criminal and civil jurisdiction limited to said city. Erom Ms decisions appeals are allowed to the district court of the county * * in the same manner as appeals from the judgments and decisions of a justice of the peace. * * But the argument is, that the ordinance was passed without authority of law and was null and void. Whether it was or not was a legitimate subject of inquiry by the magistrate, in the same manner as any other question which might be presented for his adjudication. And being determined by Mm adverse to the position of the prisoner, Ms remedy was by appeal or writ' of error and not by habeas corpus. It is not a case where a court'has acted without having jurisdiction. On the contrary, the most that can be claimed is that the magistrate erred in deciding that the ordinance was in force and that the city had the power and authority to provide for the punishment of the offense.”
In the case under consideration the justice of the peace has not exceeded his jurisdiction. By the express provisions of the statute (Stats. 1861, 39,) the justice of the peace has original jurisdiction of the subject matter. It was his duty to decide whether or not the law of 1861 had been repealed by implication or’ otherwise. In no other way could the question be raised. Such was the subject matter with which he had to deal. That he had jurisdiction to determine this question cannot be denied. Such being the fact, his judgment may be erroneous but it cannot be void. If the justice erred, petitioner has his remedy by appeal to the district court. The judgment of the justice is conclusive until reversed. It cannot be reviewed upon habeas corpus.
The writ must be dismissed. It is so ordered.
Whitman, O. J., did not participate in the foregoing decision.