The petitioner seeks a writ of prohibition from this Court to prohibit the respondent, justice of the peace of Pike County, from proceeding to. try petitioner on a charge of possessing alcoholic beverages in dry territory for the purpose of sale. The ground on which the writ is sought is that the justice of the peace improperly refused to grant a change of venue to the quarterly court, for which' petitioner had applied on motion and affidavit alleging that the justice of the peace would not afford petitioner a fair and impartial trial, and that the justice of the peace was prejudiced because he was dependent upon *238fines, fees and costs for his compensation. The response to the petition merely alleges that the justice of the peace had entered an order waiving his costs in the action.
This Court will grant a writ of prohibition against a court inferior to the circuit court only when the inferior court is proceeding erroneously within its jurisdiction, great and irreparable injury will result from the action of the inferior court, and there is no adequate remedy by appeal. Franklin v. Pursiful, 295 Ky. 222, 173 S.W.2d 131; Potter v. Trivette, 303 Ky. 216, 197 S.W.2d 245. If the inferior court is proceeding outside of its jurisdiction, the writ must be sought in the circuit court. Section 479, Civil Code of Practice. The filing of a motion and affidavit for change of venue does not deprive the trial court of jurisdiction. Rush v. Denhardt, 138 Ky. 238, 127 S.W. 785. Therefore, it was proper for the petition for a writ of prohibition in this case to be addressed to this Court, rather than the circuit court.
It it not necessary for us to decide whether the justice of the peace erred in denying the change of venue, because it clearly appears that the petitioner has an adequate remedy by appeal if there was error. The minimum penalty for possessing alcoholic beverages in dry territory for purpose of sale is a fine of $20 and imprisonment in the county jail for 30 days. KRS 242.990. Under Section 362 of the Criminal Code of Practice, a defendant has the right of appeal to the circuit court if the punishment is imprisonment or a fine of $20 or more, and under Section 364 of the Criminal Code of Practice he may supersede the judgment pending appeal.
This Court has held on at least two occasions that a writ will not issue to prohibit a change of venue in a criminal case, where there is an adequate remedy by appeal. Fish v. Benton, 138 Ky. 644, 128 S.W. 1067; Manning v. Baxter, 281 Ky. 659, 136 S.W.2d 1074. There is no reason why the same rule should not apply where the writ is sought to compel a change of venue.
The petitioner’s motion for a' writ of prohibition is overruled, and his petition is dismissed.