
708 P.2d 239 (1985)
STATE of Montana, Plaintiff and Respondent,
v.
Ray Alvin McALLISTER, Defendant and Appellant.
No. 85-295.
Supreme Court of Montana.
Submitted on Briefs August 15, 1985.
Decided October 3, 1985.
Rehearing Denied November 19, 1985.
Ray A. McAllister, pro se.
Mike Greely, Atty. Gen., Helena, Robert Deschamps, Missoula County Atty., Missoula, for plaintiff and respondent.
SHEEHY, Justice.
Defendant, Ray Alvin McAllister, appeals from the denial of his application for a writ of certiorari by the District Court, Fourth Judicial District, County of Missoula, upholding the judgment of the Justice Court, finding defendant guilty of the offense of criminal contempt in violation of § 45-7-309, MCA, a misdemeanor. We affirm the District Court.
On January 4, 1984, McAllister was cited for driving with an expired vehicle registration in violation of § 61-3-312, MCA, and for driving without a valid policy of insurance in violation of § 61-6-301, MCA. A trial date was set for February 7, 1984. At the time set for trial Justice of the Peace Janet L. Stevens disqualified herself from the case. Thereafter, Justice of the Peace Nancy L. Sabo of Ravalli County assumed jurisdiction.
On March 30, 1984, McAllister appeared pro se and moved to dismiss the complaint on two grounds. First, McAllister argued he was being twice put in jeopardy for the liability insurance citation because he had *240 been previously cited for the same offense some 17 months earlier, in August 1982. The second ground for dismissal alleged by McAllister was that his insurer and the Montana State Insurance Commission had acted improperly and therefore he could not be held accountable for failure to have insurance. On April 25, 1984, the motion to dismiss was denied and the trial date was rescheduled.
The State dismissed the insurance violation on June 25, 1984. On June 26, 1984, McAllister filed a document he entitled "Criminal Counter-complaint" which alleged several criminal violations against state officials and agencies which included justices of the peace, legislators, county attorneys, and the Montana State Insurance Commission.
A pretrial hearing was held on August 21, 1984, to narrow the issues at the trial for the expired registration citations. At the beginning of the pretrial hearing, McAllister interrupted Judge Sabo and demanded that she prove the court had jurisdiction over him. McAllister contended that the court had no jurisdiction over him because of the double jeopardy issue. Judge Sabo made efforts to explain to McAllister that the jeopardy argument had been denied at the prior hearing on his motion to dismiss. After a number of interruptions Judge Sabo told McAllister that if he did not sit down and remain quiet she would have to hold him in contempt. McAllister persisted in his conduct after the second and third warning from Judge Sabo, resulting in his being held in contempt. Upon hearing this, McAllister began to leave the courtroom. At this point McAllister pulled something out of his brief case which Judge Sabo believed to be a gun. Judge Sabo immediately requested two legal interns that were present to summon a police officer.
The object McAllister removed from his brief case was not in fact a gun but a mace pistol. Before any police officers arrived, McAllister pointed the mace pistol all around the room and especially at Con Kelly, a legal intern, who was representing the county attorney's office at the pretrial hearing.
Within approximately two minutes, two police officers arrived in the courtroom. Upon the officers' arrival, McAllister backed into a corner of the courtroom and ignored the officers demand that he set the mace pistol down. Within a few minutes three more police officers appeared. All five officers then approached McAllister and again told him to set the mace pistol down or have it taken away. Upon McAllister's failure to heed the officers' command, the two officers closest to him apprehended him and removed the mace pistol from his possession. The officers then removed McAllister to the Missoula County jail.
A formal contempt charge was filed against McAllister, and a trial was held before Justice of the Peace William P. Monger on October 29, 1984. McAllister was convicted of criminal contempt, fined $250.00 and sentenced to two days in jail, suspended.
On January 23, 1985, McAllister filed an application for a writ of certiorari for review of the contempt conviction in the District Court. In the meantime, Judge Sabo requested District Judge Harkin assume jurisdiction over the automobile registration citation as well. Judge Harkin agreed to assume jurisdiction, combined the traffic charge with the writ of certiorari, and called in Judge Nat Allen to preside.
On March 20, 1985, a hearing was held in the District Court before Judge Allen. The District Court ordered that Justice Monger's notes of the contempt proceeding be typed up and remanded the traffic citation for trial in Justice Court within 60 days. On April 20, 1985, the second hearing was held with regard to McAllister's writ. The District Court held there was no excess of jurisdiction, denied the writ and upheld the conviction. The charge of driving with an expired registration was eventually dismissed by the State on May 15, 1985, for lack of a speedy trial.
*241 The only issue before this Court on review is whether the District Court properly denied McAllister's writ of certiorari.
A writ of certiorari is a discretionary writ issued out of the Supreme Court or out of the district court, directed to an inferior tribunal, board or officer. Lay v. District Court (1948), 122 Mont. 61, 68, 198 P.2d 761, 765. The function of the writ of certiorari is to determine whether the inferior court exceeded its jurisdiction. Rose v. District Court (Mont. 1981), 628 P.2d 662, 664, 38 St.Rep. 830, 832; Matter of Gravely and Hammerbacker (1980), 188 Mont. 546, 555, 614 P.2d 1033, 1038. By statute there are three indispensable requisites to the granting of the writ of certiorari; namely: (1) excess of jurisdiction, i.e. that an inferior tribunal or board has exceeded its jurisdiction; (2) absence of the right to appeal from the act, order or judgment assailed as done or made without jurisdiction; and (3) lack of a plain, speedy and adequate remedy other than certiorari. Section 27-25-102, MCA; Lichte v. District Court (1948), 121 Mont. 34, 42, 189 P.2d 1004, 1007. Since certiorari is a discretionary writ, we will determine only whether the District Court abused its discretion in denying McAllister's application for the writ.
The judgment of the court in cases of contempt is final and conclusive. There is no appeal, but the action of a justice of the peace can be reviewed by the district court of the county in which the justice of the court of limited jurisdiction resides. Section 3-1-523, MCA. Thus, with regard to the latter two requisites for a writ of certiorari, McAllister's application for a writ was proper.
We look now to determine whether the Justice Court acted within its jurisdiction. Under its contempt power the Justice Court may sua sponte find a person in criminal contempt of the court's authority. Further, the criminal contempt action is totally independent of the case out of which the contempt arose. State v. Abrams (Mont. 1984), 680 P.2d 585, 586, 41 St.Rep. 871, 872.
The offense of criminal contempt, a misdemeanor, is set forth in § 45-7-309, MCA, and provides:
A person commits the offense of criminal contempt when he knowingly engages in any of the following conduct:
(a) disorderly, contemptuous, or insolent behavior committed during the sitting of a court in its immediate view and presence and directly tending to interrupt its proceedings or to impair the respect due to its authority;
(b) breach of the peace, noise, or other disturbance directly tending to interrupt a courts proceeding; .. .
McAllister's conduct at the pretrial hearing on August 21, 1984, clearly justified Judge Sabo in exercising her contempt power. Thereafter, a complaint was filed formally charging McAllister with criminal contempt. On October 29, 1984, trial was held in Missoula Justice Court before Judge Monger and McAllister was found guilty of contempt.
The Justice Court's jurisdiction over the contempt trial can be found at § 3-10-303, MCA, which provides:
The justices' courts have jurisdiction of public offenses committed within the respective counties in which such courts are established as follows:
(1) Jurisdiction of all misdemeanors punishable by a fine not exceeding $500 or imprisonment not exceeding 6 months or both such fine and imprisonment; ... .
A misdemeanor criminal contempt action, like most other misdemeanors, is punishable by up to 6 months in jail or $500.00 or both. Section 45-7-309(2), MCA. The Justice Court clearly had jurisdiction over McAllister's contempt trial and did not exceed that jurisdiction.
The District Court did not abuse its discretion in denying McAllister's application for a writ of certiorari. We affirm.
TURNAGE, C.J., and WEBER, HARRISON and HUNT, JJ., concur.
