delivered the opinion of the court.
The relators filed in the Superior Court, a petition for a writ of prohibition against appellee, a justice of the peace, seeking to prohibit him. from proceeding with the trial of certain cases sent to him on change of venue by another justice.
From the petition it appears that said relators were served with replevin writs in fifteen cases for the recovery of certain property claimed to belong to members of the Cook County Bottlers’ Association. The writs were issued by Walter J. Gibbons, Justice of the Peace. Before the commencement of the trial, affidavits were filed before said Justice Gibbons setting forth that relators believed they could not get a fair and impartial trial before him, nor before appellee and another justice, who were, it is said, the nearest justices of the peace to said Gibbons. The cases were however, against the protest of relators, sent by said Gibbons to appellee. Alleged facts are recited in said petition which, if true, tend to show that the justices named were or may have been prejudiced in favor of the plaintiffs in the replevin suits. The petition further states that when said replevin suits came up before appellee, the relators’ attorney again moved for a change, of venue from appellee, to a disinterested justice, which motion was denied, and the cases were set down for hearing.
The statute provides (R S., Chap. 79, Sec. 34,) that “ previous to the commencement of any trial before a justice, either party or his agent or attorney may make oath that it is the belief of the deponent that the plaintiff or defendant, as the case may be, can not have an impartial trial before such justice of the peace.” Thereupon it is made the duty of the justice to transmit the action “ to the nearest justice of the peace in the same county, who is not of kin to either party, sick, absent from the town, or interested in the event of the action as counsel or otherwise.” Without considering whether the relators would have been entitled to a change "of venue from appellee had they proceeded to make oath before him as provided for in the statute, which was not done, it is yet evident they could have at once appealed from any judgments such justice might have rendered, obtaining thus a speedy and adequate remedy. “ A writ of prohibition is an extraordinary writ, issued by a superior court to an inferior court to prevent the latter from exceeding its jurisdiction.” The People v. Cook County Circuit Court, 169 Ill. 201 (204). But it is a writ issued “ only in cases of extreme necessity,” and “ it is never resorted to when there is another adequate remedy, nor can it be used to correct mere irregularities, or to perform the functions of an appeal or writ of error.” Idem. Upon appeal from the justice the whole matter is heard de novo. It is sought in this case to obtain a writ of prohibition to perform the functions of an appeal, viz., to test the correctness of the justice’s ruling. The demurrer to the petition was therefore properly sustained and the writ properly denied. People v. Cook Circuit Court, 173 Ill. 272 (275). It is not an appropriate process “for the correction of errors of inferior tribunals.” High on Extraordinary Legal Remedies, Sec. 772. The judgment of the Superior Court is affirmed.