1. The motion to dismiss the appeal must be overruled. It is well settled by our previous decisions, that an appeal lies to this court, from a judgment of the circuit court, awarding or refusing a mandamus. — Etheridge v. Hall, 7 Porter, 47; Tarver v. Comm’rs’ Court of Tallapoosa, 17 Ala. 527; Falkner v. Judge, &c., 19 Ala. 177; Brooks v. Kirby, 19 Ala. 74; Riggs v. Pfister, 21 Ala. 469; Tenn. & Coosa Rivers R. R. Co. v. Moore, at this term.
2. The invariable test, by which the right of a party applying for a mandamus is determined, is to inquire, first, whether he has a clear legal right; and if he has, then, secondly, whether there is any other adequate remedy to which he can resort, to enforce his right. — People v. Thompson, 25 Barb. 76. In this case, the relator fails, to show a clear legal right to practice in the mayor’s court, or, indeed, in any of the courts of this State. The only persons who are entitled to practice in the courts of this State, are those who were regularly licensed under the laws of this State before the adoption of the Code, and those who, since the adoption of the Code, have been admitted by a license from the supreme court, the court of chancery, or a circuit court. — Code, § 729. Persons licensed since the adoptjon of the Code, are not entitled to practice, until they take the oath prescribed by section 735; and those who were regularly licensed before the passage of the Code, “ can practice only in such courts as their license authorizes them.” — Code, § 730 The relator alleges, that “ he is a practitioner of law in all the courts of this State, both of state and federal jurisdiction.” We do not think that this is a sufficient allegation of his legal right to practice in the courts named. It is not alleged, nor was it shown on the hearing of the application, that the relator was regularly licensed *261under the laws of this State before the adoption of the Code, or that he had since that time been admitted by a license from a court competent to grant it, and had taken the oath prescribed. The essential prerequisites to a legal,nght to practice in any of the courts of this State not having been alleged, the 3d exception to the petition should have been sustained, and the court erred in awarding the mandamus. In a proceeding of this sort, the relator must distinctly aver all the facts necessary to give him the right which he claims. — See Tapping on Mandamus, 27-8, 186, 193, 293-4, 320-1; Rex v. Jotham, 3 Term R. 178; Kimball v. Morris, 2 Metc. 573, 576 ; Cullum v. Latimer, 4 Texas, 329 ; 1 Chitty’s Prac. 798, 800, 808; The King v. Bishop of Oxford, 7 East, 345; Queen v. Mayor, 13 Ad. & Ell. (N. S.) 1; see the forms pursued in 19 How. (U. S.) 9.
We do not inquire whether the allegations of the petition were in other respects sufficient.
3. We might stop here; but, if we did so, the main question involved in this controversy would be left unsettled ; and, under the circumstances, we feel it our duty to declare our views in regard to it. That question is, whether an attorney, who has obtained a license from the supreme, circuit, or chancery court, and taken the prescribed oath, has a legal right to practice in the mayor’s court in Mobile.
We dt> not think that the 10th and 29th sections of the bill of rights, (Const. of Ala. art. 1, §§ 10, 29,) apply to proceedings before a mayor, for the violation of city ordinances. The 10th section declares, that “in all criminal prosecutions, the accused has the right to be heard by himself and counsel.” The common-law definition of a crime, as given by Blackstone, is, an act committed or omitted in violation of a public law, (4Blackst. Com. 3;) and the term “ criminal prosecutions,” as employed in the constitution, relates exclusively to prosecutions for violations of the public laws of the State. A city ordinance is not a public law of the State, but a local law of a particular corporation, made for its internal police, and' good government. Moreover, if municipal cases before *262a mayor of a city or town were “ criminal prosecutions ” in the sense of the constitution, they would have to be carried on in the name of the State, and conclude “against the peace and dignity of the same.” — Const. of Ala. art. 5, § 17. It would follow, also, that an acquittal or conviction before the mayor would be a bar to any other prosecution for the same offense, which, it is well settled, is not the case. — See Mayor of Mobile v. Rouse, 8 Ala. 515; State v. Estabrook, 6 Ala. 653; Williams v. City Council, 4 Geo. 509; Floyd v. Commissioners, 14 Geo. 354; Mayor of Mobile v. Allaire, 14 Ala. 400.
Nor are these proceedings for violations of city ordinances “ civil causes,” in the sense of the 29th section of the bill of rights, which declares, that “ no person shall be debarred from prosecuting or defending any civil cause, for or against him or herself, before any tribunal in this State, by him or herself or counsel.” The civil causes here spoken of are those which deal with private wrongs ; that is, with acts which constitute an infringement or privation of the private or civil rights belonging to individuals. These terms, thei’efore, include only those legal proceedings which seek redress for civil injuries. But city ordinances are punitive regulations; and the object of a proceeding for the violation of them, is not redress for a civil injury, but the punishment of an offender against the peace and good order of society. Hence, they are termed ^wasi-criminal proceedings. — See Brown v. Mayor of Mobile, 23 Ala. 722; Mayor of Mobile v. Rouse, 8 Ala. 515; Mayor v. Allaire, 14 Ala. 400. We must, therefore, look elsewhere for the right of counsel to appear on the trial of municipal cases before the mayor.
It is provided by the Code, that persons admitted to the supreme court, after the adoption of the Code, “may practice in all the courts in this State;” and those admit ted by any chancery or circuit court, “ may practice in any-court of the State, except the supreme court.” — Code, § 730. Is the court which the mayor of Mobile holds for the trial of offenders against the municipal laws of the city,;'“ a court in this State,” within the meaning of this section of the Code ? It would be an unwarrantable perversion of plain language to hold that it is not. According *263to Lord Coke, “ a court is a place where justice is judicially administered.” — 1 Coke’s Littleton, 58 (a.) In Groenvelt v. Burwell, (1 Salkeld, 200,) Chief-Justice Holt said : “ Whenever a power is given to examine, hear and punish, it is a judicial power, and they in whom it is reposed act as judges ; and whenever there is a jurisdiction erected, with power to fine and imprison, that is a court of record, and what is there done is matter of'record.” See, also, 3 Blackst. Com. 24-5. By the city charter, the mayor is required to hold “ a court,” daily, for the trial of all offenders against the laws and ordinances of the corporation. He issues process, as a justiceof the peace, for the arrest of offenders ; subpoenas and examines witnesses, both for the corporation and the defendant, and gives judgment as shall appear to him legal and just, which is enforced by execution, to be issued by the clerk of the corporation. — Municipal Laws of Mobile, p. 18, §34; p. 44, §§ 111, 112. The court which the mayor holds is an “inferior jurisdiction,” in the sense of the constitution, and is, therefore, subject to the general superintendence and control of the supreme court. — Const, of Ala., art. 5, § 2. Its proceedings may be revised by the ch’euit court, an d afterwards by this court; and its judgments, in matters within its jurisdiction, - are final and conclusive until reversed or set aside. — -Intendant of Marion v. Chandler, 6 Ala. 899. Here are all the characteristics of a court— an officer, sitting at stated times appointed by law, authorized to bring parties and witnesses before him, and clothed with the power to hear evidence, to decide questions of law and of fact, to try and determine causes according to legal rules, to punish offenders, and to render judgments, which are enforceable by execution, and final and conclusive until reversed or set aside by a revising tribunal.
The constitutional and statutory provisions securing to suitors and accused persons the right to the aid of counsel, and section 730 of -the Code, defining the courts in which attorneys have the right to practice, all relate, directly or indirectly, to the same subject-matter. Eor the right of a party to the aid of counsel, in any particular proceeding or court, would be a barren right, if there were no *264counsel authorized to appear in his behalf. While, therefore, it is true that the constitutional and statutory provisions securing to parties the right to the assistance of counsel do not apply to the trial of municipal cases before a mayor; yet they serve to indicate the general spirit and policy of oiff laws upon the subject; and we should strive to put such a construction upon section 730 of the Code, as will make it harmonize with that spirit and policy.
We have already observed, that by the constitution, the right to be heard by himself and counsel, is secured to the accused in all “ criminal prosecutions.” — Const, art. 1, §10. These terms include every prosecution for a violation of the criminal laws of the State, in a court authorized to determine the question - of guilt or innocence by a judgment of acquittal or conviction, no matter how trifling the alleged offense, or how insignificant the punishment awarded. In like manner, the parties to the pettiest “ civil 'cause” that may be tried before a justice of the peace, or “ any tribunal in this State,” have a constitutional right to the aid of counsel. — (Const. art. 1, §29.) In all preliminary, inquiries before committing magistrates, no matter what the grade of the offense charged, the legislature has secured to the accused the right to the aid of counsel, although such an investigation is not, in a legal sense, a trial, which means an inquiry in which the guilt or innocence of the accused is finally passed upon. The committing magistrate exercises an authority judicial in its nature, but is not clothed with judicial,power. He has no authority to acquit or condemn. His action does not conclude either the State or the accused. He may discharge the defendant, and yet the grand jury may indict, and the petit jury convict him. He may bind the party over)1 but the grand jury can ignore the bill. Hence, it has been said, that a committing magistrate does not act as a court of justice, but only asan officer deputed by law to conduct a preliminary inquiry. — See Ex parte Gist, 26 Ala. 161-2; Cox v. Coleridge, 1 Barn. & Cress. 37, 50, 52-3-4.
A trial before a mayor, for a breach of city ordinances, may often involve much more serious consequences to *265the accused than a prosecution by indictment, in the ■circuit court, a civil cause before a justice of the peace, ■or a preliminary investigation before a committing magistrate. In all of these last named proceedings, the right to the aid of counsel is carefully secured; and the law would be inconsistent, if it denied the same right to persons on trial for a violation of city ordinances. It not infrequently happens, indeed, that the same act is a violation of the public law of the State, and also of the police regulations of a corporation ; and it is at least supposable, that the punishmentprescribed by the corporation might, in some eases, be more severe than that provided by the legislature for the same offense. If, in such a case, the party were prosecuted, as he well might be, both before the mayor and the circuit court, it would seem anomalous, as well as unjust, to concede the right to'the aid of counsel in the court where the punishment would be ■slight, and to deny it in the court where the punishment would be severe. v
On the whole, our opinion is, that an attorney, who has been regularly admitted to practice in accordance with the provisions of the Code, has a legal right, when employed for that purpose, to appear as-counsel for persons on trial before the mayor of Mobile, for alleged violations of the city ordinances,
The right of such an attorney to appear as counsel for the accused, on a preliminary inquiry before the mayor as a committing magistrate, is also clear, though it stands upon a somewhat different footing. By the city charter, the mayor has the power “ to examine and commit, or discharge on bail, all persons charged with offenses not capital, in the same manner as justices of the peade.” Municipal Laws of Mobile, p. 16, § 33; Acts 1843-4, p. 181, § 16. The Code expressly provides, that on preliminary investigations before committing-magistrates, “the defendant may appear by counsel.” — Code, §3403. This section of the Code is as applicable when the preliminary inquiry is had before the mayor as a committing magistrate, as when it takes place before a justice of the peace, or a judge of the circuit court. — Code, § 3339. It would *266be singular, indeed, if a defendant bad the right to the aid of counsel before one committing magistrate in Mobile, but had not the same right before another committing magistrate in the same city. The right of the defendant to have counsel appear for him, implies the right of some counsel to appear; and, to effectuate the intention of the legislature, we hold, that an attorney who has been admitted to practice in accordance with the provisions of the Code, has the right, on being employed for that purpose, to appear as counsel for the defendant on a preliminary inquiry before the mayor of Mobile, or any other committing magistrate.
4. Under the provisions of the Code in relation to attorneys, the right to practice, which is obtained upon procuring license and taking the prescribed oath, is a legal right,- of which the attorney cannot be deprived,' except by a judgment of removal or .suspension, rendered by the circuit court, -on proceedings instituted in conformity with the direction's contained in chapter 10, title 9, part 1, of the Code. — See §§ 747 to 761. These proceedings are begun by an accusation in writing, which the attorney is cited to answer. If he denies the accusation, the court proceeds to try the same; the attorney having the right to demand a trial by jury. "Witnesses may be summoned, and depoitions taken, as in ordinary actions at law. A judgment of- acquittal is final, but from a judgment of removal or suspension, the accused may appeal to this court. — Code, §§750-9.
One of the duties of attorneys, as these are defined by section 738 of the Code, is “to maintain the respect due to courts of justice and judicial officers;” and among the specified causes fot the removal or. suspension of an attor ney, is any willful violation of this duty. — See § 748'. But, until such removal or suspension has been effected 'by a judgment rendered in the circuit court, in a proceeding instituted for that purpose, no court in this State can law fully deny to a regularly licensed attorney the right to practice in causes tried before it, upon the ground that the attorney has, on some past occasion,'spoken disrespectfully of, or conducted himself in a manner offensive *267contemptuous, or insolent behavior in court, tending in any wise to diminish or impair the respect due to judicial tribunals, or to interrupt the due course of trial,” is a contempt of court, for which the offending party may be punished in the summary manner provided by law. — Code, §§ 561-2-3. But contempts must be punished as they occur, and in the summary way directed; anda court cannot, exmero motu, punish an attorney for offenses of this nature, or, indeed, for any misconduct, by a general denial of his right to practice before it. Willful misconduct in his profession, and willful violations of any of the duties enjoined upon him by law, will justify a proceeding in the circuit court for the removal or suspension of an attorney, and a judgment in either form will deprive him of his right to practice in any court. But, until such judgment is rendered, unprofessional or disrespectful conduct on the part of an attorney, though amounting to a contempt, and though furnishing sufficient cause for his removal or suspension, will not justify a court in excluding him from practicing at its bar.
5. When an attorney, who has not been removed or suspended in the mode pointed out by the Code, is pro-by any court in which his license authorized him practice, from appearing before it as counsel in causes which he has been employed, this is the deprivation of clear legal right, to the enjoyment of which he will be by mandamus. If the writ would not lie in such case, the party would be without any adequate remedy the -wrong complained of. There are some cases in it has been held, that mandamus would not lie, to an attorney who had been dismissed by order of But these are cases in which a formal order of had been made, and in which, moreover, it rested exclusively with the court making the order to determine was qualified to become or continue an attorney of court. Under such circumstances, the order of dis-is held to be a judicial act, done in the exercise of judicial discretion vested in the court by law ; and a cannot be issued by a superior court, command-it to reverse its decision, and restore the attorney to the *268office he has lost. Bat, under our system, it docs not rest exclusively with the several courts to determine who is qualified to become or continue an attorney of the court. On the contrary, as we have already seen, an attorney admitted by the supreme court has the legal right to practice “in all the courts in this State,” — a right of which he can be deprived only in the mode pointed out by law — that is, by a judgment of removal or suspension, rendered by the circuit court, and founded on some of the causes specified in the Code. If an attorney, who lias obtained a license, and taken the proper oath, in conformity with the requirements of the Code, is prohibited from practicing in the mayor’s court in Mobile, his right to a mandamus is clear, both upon principle aud authority. Hurst’s case, 1 Levinz, 75; Hastings’ case, 1 Modern, 23; Rex v. Barker, 3 Burr. 1267-8 ; The King v. Sheriff of York, 3 B. & Ad. 770 ; Queen v. Lord Mayor, 13 Ad. & Ell. (N. S.) 1, 31; People v. Turner, 1 California R. 190 ; Tapping on Mandamus, 44-5, and cases cited ; 6 Bacon’s Abr. 424.
Judgment reversed, and cause remanded.