
571 P.2d 1325 (1977)
R. Paul VAN DAM, Salt Lake County Attorney, Plaintiff and Appellant,
v.
Melvin H. MORRIS, Maurice D. Jones, Robert C. Gibson, Floyd H. Gowans, Paul C. Grant, Raymond S. Uno and Kim McHenry, Defendants and Respondents.
No. 15059.
Supreme Court of Utah.
November 3, 1977.
R. Paul Van Dam, Salt Lake County Atty., John T. Nielsen, Deputy County Atty., Salt Lake City, for plaintiff and appellant.
Robert Van Sciver, Salt Lake City, for defendants and respondents.
*1326 MAUGHAN, Justice:
Kim McHenry was charged with the crime of an assault against a peace officer as provided in Sec. 76-5-102.4. Such a crime is classified as a Class A misdemeanor. A preliminary hearing was held in the city court. At the close of the presentation of the State's evidence, defense counsel made a motion to dismiss. The motion was granted.
The State proceeded to file another complaint. At the inception of the preliminary hearing, defense counsel made a motion to dismiss based on the provisions of 77-51-6. That motion was granted.
The State then sought an extraordinary writ in the district court to mandate the judge of the city court to set the matter for a preliminary hearing. The district court denied the petition, and the State appeals. We reverse and remand. All statutory references are to U.C.A. 1953.
The city court does not have jurisdiction over a Class A misdemeanor, 78-4-16; 78-5-4(3); 76-3-204(1).[1] In this case the city judge acted as a committing magistrate.[2] The power of a committing magistrate *1327 upon a preliminary examination is limited to discharging the accused in accordance with Sec. 77-15-17, or binding him over in accordance with Sec. 77-15-19.
Both parties cite the provisions in Chapter 51, Title 77. A review of Sections 1, 2, 3, and 4, reveal the powers of the court to dismiss an action, information or indictment. The city court dismissed the action based on Sec. 77-51-6, which provides:
An order for the dismissal of an action as provided in this chapter shall be a bar to any other prosecution for the same offense, if it is a misdemeanor; but shall not be a bar, if the offense is a felony.
The city judge, acting not as a city judge with jurisdiction over the offense, but as a magistrate (77-10-5(3)), did not have the power to dismiss the accusatory pleading brought before him for the purpose of preliminary examination.
The office of magistrate is a distinct and separate statutory office even though the office of magistrate is conferred upon those designated individuals in Sec. 77-10-5, who exercise judicial powers. A preliminary hearing is not a trial, and a magistrate presiding at the hearing does not sit as a judge of a court and exercises none of the powers of a judge in a court proceeding; except as they inhere in the office of magistrate. When a judge acts in the capacity of a magistrate, he does not do so as a judge, but rather as one who derives his powers from Sections 77-10-4 and 77-10-5.[3]
A preliminary examination does not invoke the jurisdiction of the court. In such a proceeding, the action is not action by a judge of any court, but that of a magistrate, a distinct statutory office. Justices of the Supreme Court, district judges, city court judges, and justices of the peace, when sitting as magistrates having the jurisdiction and powers conferred by law upon magistrates and not those that pertain to their respective judicial offices.[4]
The authority of a magistrate is purely statutory. A judge, who sits as a magistrate does not carry his court or his judicial attributes with him, except to the extent they inhere in the office of magistrate.[5]
The statutory power conferred on a magistrate conducting a preliminary hearing is limited to discharging the defendant (77-15-17) or holding him for proceedings in the district court (77-15-19). The powers to dismiss criminal proceedings in Chapter 51, Title 77, are conferred on courts in the proper exercise of their respective jurisdictions.
This matter is remanded to the district court for proceedings not inconsistent with this opinion.
CROCKETT, WILKINS and HALL, JJ., concur.
ELLETT, Chief Justice (concurring):
I concur but desire to add another reason for holding as we do. The city judge thought that once a misdemeanor was dismissed, that was the end of prosecution for that crime, and the district judge apparently agreed with him. They did not read the statute (U.C.A. 1953, 77-51-6) very carefully. That statute says: "An order for the dismissal of an action as provided in this chapter ... ." How does this chapter provide for dismissals?
In every instance mentioned in the chapter, the dismissal is by the district court after a bindover on preliminary hearing by the city judge or after an indictment found by a grand jury. Any other dismissal of a misdemeanor is not a bar to further prosecution unless it falls within the rule of double jeopardy, the statute of limitations, or some other rule of law that would also be applicable to felony trials.
NOTES
[1]  78-5-4(3), here applicable appears in Vol. 9, U.C.A. 1953, not in Replacement Vol. 9A, U.C.A. 1953.
[2]  Nickolopolous v. Emery, 59 Utah 588, 206 P. 284 (1922); State v. Hale, 71 Utah 134, 263 P. 86 (1927).
[3]  Koski v. James, 47 Cal. App.3d 349, 120 Cal. Rptr. 754, 758-759 (1975).
[4]  Ibid.
[5]  Burris v. Superior Court of Tulare County, 43 Cal. App.3d 530, 117 Cal. Rptr. 898, 903 (1974); Wells v. Justice Court of Merced Judicial District, 181 Cal. App.2d 221, 5 Cal. Rptr. 204 (1960).
