The plaintiff herein, L. A. Fels, was charged by a complaint filed in the Justice’s Court of the City of Berkeley with having committed a misdemeanor, to wit, violation of an ordinance of that city. He was admitted to bail, entered a plea, of not guilty, and moved for a dismissal of the charge. The motion was denied, and thereupon he instituted the present proceeding in the superior court for a writ of prohibition. The petition for the writ was based upon the ground that the justice’s court was without jurisdiction to entertain or try the action for the following reasons, so plaintiff alleged: That the complaint failed to state a public offense, and that the portion of the ordinance which it is claimed was violated was unconstitutional. The proceeding terminated in the issuance of a writ permanently prohibiting the defendants, namely, the justice’s court and the presiding justice of the peace thereof, from taking any further proceedings in the trial of said criminal action. An appeal was taken by said defendants, and it is presented on the judgment roll alone.
We are of the opinion that under well-established legal principles and the admitted facts of the case, the remedy *741 of prohibition was not available to plaintiff. As repeatedly-held, the sole province of a writ of prohibition is to arrest proceedings of a tribunal or persons exercising judicial functions when without or in excess of jurisdiction. In other words, one of the prerequisites to the issuance of such a writ is that the tribunal or person against whom the writ is sought is acting without or in excess of jurisdiction; and the main test of jurisdiction is whether such tribunal or person is authorized by law to hear and determine the proceeding before it. (21 Cal. Jur. 583 ; Code Civ. Proc., sec. 1102.)
Moreover, it is well settled that the authority so to hear and determine involves the power to decide incorrectly, as well as correctly, in a given case or controversy within that jurisdiction, and does not depend upon the regularity of the exercise of that power or upon the rightfulness of the decision there made; that is to say, such writ is never employed as a means of correcting errors of inferior courts even though objection thereto is based on jurisdictional grounds. (21 Cal. Jur. 580, 584 ; 7 Cal. Jur. 590, and cases cited thereunder.) In this connection it has been expressly held that if an order made as an incident to the progress of a case involves the question of jurisdiction, prohibition cannot be invoked to annul the order or stop proceedings under it.
(County of Sutter
v.
Superior Court,
Here admittedly the Justice’s Court of the City of Berkeley has jurisdiction over criminal actions involving the alleged violations of ordinances of that city where, as here, it is charged that such violations are committed within the municipal boundaries of the city. Manifestly, therefore, the defendant justice’s court and the presiding justice of the peace thereof had complete jurisdiction to proceed with the trial of the action then before it, regardless of the propriety of the ruling on the points involved in plaintiff’s motion to dismiss.
Plaintiff has cited but one case on this point,
In re Kelso,
Secondly, and in any event, it is admittedly the law of this state that authority to issue writs of prohibition is restricted to cases where there is no plain, speedy or adequate remedy at law. It is so declared by both legislative enactment and judicial decisions (Code Civ. Proc., sec. 1103 ; 21 Cal. Jur. 584); and here plaintiff was provided with two such remedies; namely, by way of appeal to the superior *743 court, in case of his conviction; and by way of habeas corpus, either before or after trial and conviction.
As to the question of the completeness of the remedy by appeal, the case of
Strouse
v.
Police Court,
And as to the remedy of
habeas corpus
being a plain, speedy and adequate remedy in the ordinary course of law, the cases of
Leach
v.
Superior Court, supra, Downs
v.
Municipal Court, supra, Keith
v.
Recorder’s Court,
Plaintiff has cited several cases wherein writs of prohibition were issued; but an analysis of those cases demonstrates that none is here controlling. In the first three,
Terrill
v.
*744
Superior Court,
In view of the conclusion reached on this branch of the ease it becomes unnecessary to inquire into the question of the constitutionality of the ordinance. The judgment appealed from is reversed with directions to enter a new judgment in favor of the defendants.
