
143 N.W.2d 212 (1966)
STATE of Minnesota, Respondent,
v.
Lloyd ZIRBES, Relator.
No. 40349.
Supreme Court of Minnesota.
June 10, 1966.
*213 Burns, Burns, Rawlings & Burns, St. Cloud, for relator.
Ben Grussendorf, County Atty., Grand Rapids, for respondent.

OPINION
PER CURIAM.
This matter is before us on a writ of prohibition which challenges the jurisdiction of a justice of the peace to proceed with a preliminary hearing on a felony complaint after demand for change of venue pursuant to Minn.St. 531.115.
Minn.St. 531.115, so far as applicable here, provides:
"Subdivision 1. Whenever a person is charged with a criminal offense or violation of an ordinance in which jurisdiction is in a justice court or a court in which the judge is paid upon a fee basis, the defendant may at any time before trial demand in writing that his case be removed to another court having jurisdiction within the county and presided over by a salaried judge.
"When such justice of the peace or such judge is furnished with a demand for change of venue, he shall forthwith transmit such files and proceedings to the court in the county to which transfer is requested by the defendant. Thereafter such proceedings will be had in such court to which the case has been transferred as if such proceedings had been originally commenced therein.
* * * * * *
"Subd. 3. No criminal proceedings or civil matter shall be transferred to the district court under this section and the provisions of this section shall not apply in any county wherein there is no court of appropriate jurisdiction presided over by a salaried judge other than the district court."
We considered this statute in Smith v. Tuman, 262 Minn. 149, 114 N.W.2d 73, where we noted that the justice of the peace is no longer a constitutional officer and that the legislature is free to abolish the office and to substitute any system of inferior court as it deems suitable. In that case we enjoined the justice of the peace by a writ of prohibition from further proceedings after a demand for removal was filed in a criminal action brought in his court.
The county attorney contends that the Smith case does not apply here because the charge pending before the justice is a felony and one which will not be tried in his court. He argues that since the defendant is not "a person * * * charged with a criminal offense," the justice of the peace will not be involved in a trial procedure; that the preliminary hearing is only a bindover proceeding and does not involve an offense of which the justice court has jurisdiction and "is not in such sense a trial."
Contrary to the contentions of the county attorney, it is our view that the function of a justice of the peace at a preliminary hearing is something more than an administrative or clerical duty. His jurisdiction is considerable.[1] At the preliminary *214 hearing he hears the evidence, rules on the admissibility of it, and, as indicated by § 629.52, he may discharge the defendant "if * * * it shall appear that no offense has been committed, or that there is not probable cause for charging the prisoner with it, * * *."
We said in State v. Dlugi, 123 Minn. 392, 394, 143 N.W. 971, 972, that:
"When one is held by an examining magistrate to answer in the district court for a felony, a prosecution for felony is pending in that court."
Moreover, recent decisions indicate the growing importance of the preliminary hearing in criminal prosecutions. In State ex rel. Ballinger v. Tahash, 273 Minn. 177, 140 N.W.2d 53, we noted that the United States Supreme Court has held in certain cases[2] that due process of law guarantees the accused the right to counsel at all critical stages of the proceedings and that failure to provide counsel at a preliminary hearing may result in prejudice to the defendant. In a recent case from the Court of Appeals for the District of Columbia, Dancy v. United States, (Oct. 26, 1965), 123 U.S.App.D.C. ___, 361 F.2d 75, it was held that the failure of the defense counsel to have an opportunity to cross-examine *215 the prosecution witnesses in the preliminary hearing resulted in a disadvantage at trial which was fatally prejudicial. Since the preliminary hearing may be a critical stage in the criminal proceedings, we should conclude that it comes within the purview of § 531.115 as being one in which the justice of the peace has jurisdiction. Accordingly, the demand for removal to another court having jurisdiction within the same county and presided over by a salaried judge should be respected.
The contention of the state that the provisions of § 531.115 cannot be invoked to change the venue because there is no "salaried" judge in the county who is a lawyer or one learned in the law may be disposed of by observing that the statute provides for removal to a "salaried" judge and makes no requirement that the case be transferred to a municipal judge who is also a lawyer. We must be controlled by the language of the statute, from which it appears that the legislature apparently considered that the layman who is a "salaried" judge, acting as a judge of a municipal court, is more qualified than a justice of the peace who serves on a fee basis.
The remaining objection that the demand for removal is not in proper form may also be disregarded. The file would indicate that the demand has been mailed to the justice of the peace, and if it is necessary to name the precise "salaried" judge to whom it should be referred, that is a correction that can be made by an amended demand.
It is unnecessary to consider the application of § 525.011, which deals with the jurisdiction of the probate court in criminal matters. Because of population limitation, that statute does not apply in this case.
Writ made absolute.
NOTES
[1]  Minn.St. 530.01 (in part): "The jurisdiction of justices of the peace is coextensive with the limits of the county in which they reside, except * * *."

Minn.St. 530.05 (in part): "Such justice shall have jurisdiction of the following actions and proceedings:
* * * * * * *
"(3) An action for a penalty given by statute, not exceeding $100."
Minn.St. 633.01 (in part): "Justices of the peace have power and jurisdiction, throughout their respective counties, as follows:
* * * * * * *
"(4) To cause to come before them persons who are charged with committing any criminal offense and commit them to jail, or bail them, as the case may require."
A justice court has jurisdiction to hold a preliminary hearing in a felony case. Minn.St. 628.31: "No information shall be filed against any person for any offense until such person shall have had a preliminary examination as provided by law, before a justice of the peace or other examining magistrate or officer, unless such person shall waive his right to such preliminary examination."
The importance of the preliminary hearing has been given statutory recognition. Minn.St. 611.07: "Subdivision 1. When a defendant shall be charged upon indictment or information or complaint for any felony or gross misdemeanor and shall request the magistrate to have counsel appointed * * *, the county attorney shall immediately certify to the judge of the district court of the county wherein the preliminary examination is had that the defendant is without counsel * * *. The district court shall then appoint counsel, not exceeding two, for such defendant, prior to his preliminary examination by a magistrate, * * *."
Minn.St. 629.50: "The magistrate before whom any person shall be brought upon a charge of having committed an offense shall, as soon as may be, examine the complainant and the witnesses in support of the prosecution, on oath, in the presence of the party charged, in relation to any pertinent matter connected with such charge, after which the witnesses for the prisoner, if he has any, shall be sworn and examined, and he may be assisted by counsel in such examination, and also in the cross-examination of the witnesses in support of the prosecution."
Minn.St. 629.51: "While examining any witness, the magistrate may in his discretion exclude all other witnesses from the place of examination, and upon request, or if he sees cause, he may direct the witnesses for and against the prisoner to be kept separate, so that they cannot converse with each other until they have been examined. He shall reduce the testimony to writing, or cause it to be done, and, when he shall so require, have it signed by the witnesses."
Minn.St. 629.52: "If upon the whole examination it shall appear that no offense has been committed, or that there is not probable cause for charging the prisoner with it, he shall be discharged. Any person charged with an offense punishable by imprisonment in the state prison for more than seven years shall not be admitted to bail by a justice of the peace; in all other cases bail may be taken in such sums as in the opinion of the judge or magistrate having jurisdiction will secure the appearance of the accused at the court where he is to be tried."
[2]  Hamilton v. State of Alabama, 368 U.S. 52, 82 S.Ct. 157, 7 L.Ed.2d 114; White v. State of Maryland, 373 U.S. 59, 83 S.Ct. 1050, 10 L.Ed.2d 193.
