Opinion by
Rice, P. J.,The act of June 8, 1893 (P. L. 345), provides that if the petition presents the substance of a case for mandamus, the court shall direct that such writ issue in the alternative form : “ Provided, however, that if the right to require the performance of the act is clear, and it is apparent that no valid excuse can be given for not performing it, a peremptory mandamus may be awarded in the first instance and directed to issue forthwith.” This is not a case where it was apparent, on the face of the petition, that no valid excuse for not performing the act could be given; therefore, regularly, an alternative writ should have been issued. The defendant, however, appears to have waived that formality, and filed an answer setting forth his reasons for refusing to grant any other certificate than such as he had tendered to the plaintiff. We may, therefore, treat the rule to show cause, as a substitute for an alternative writ, and the.answer as a return thereto. “ In such a return,certainty to a certain intent in general, and no more, shall be required: ” Sec. 13, act of June 8, 1893, P. L. 345. A return to an alternative mandamus is sufficient if it contains a full and explicit answer to all the allegations expressly made in the petition, and discloses a fair legal reason why the mandamus should not be obeyed: 14 Am. & Eng. Ency. of Law, 231. Judged by these rules the answer was sufficient in law. When this stage of the proceedings was reached it was the privilege of the plaintiff to demur to the return, or to plead to or traverse all or any of the material facts therein contained. It is at this point that the proceedings in mandamus begin, and they are then to be carried on, “ as in other actions at law,” until an issue of law, to be decided by the court, or an issue of fact to be decided by a jury, is raised. The system is a complete and logical one and is well calculated to bring before the court the precise point to be decided. But, on the same day that *512the answer was filed, and before the cause was brought to an issue, the court made an order, directing the parties to take depositions. Depositions were’taken, and later, the plaintiff filed a replication traversing the facts alleged by the defendant as his reasons for refusing to issue such certificate as the plaintiff demanded. Here the pleading ended, and the court then proceeded to dispose of the case by a consideration of the evidence pro and con as to the plaintiff’s character and as to his habits in the use of intoxicants. Having arrived at the conclusion, to quote the language of the learned judge, that “ the evidence wholly fails to convict him of being an habitual drinker of intoxicants, or as a man not of good moral character,” the court made a decree awarding a peremptory mandamus, commanding the defendant, as county superintendent, to issue a proper legal certificate as teacher, to the plaintiff, in accordance with his educational qualifications, and directing the defendant to pay the costs.
. It was held in Com. v. Hyde Park, 15 W. N. C. 506, that where the defendant has appeared in answer to a .rule or notice and has been heard, and there is no controversy as to the facts, and the right of the relator is clear, a peremptory writ of mandamus may, in the discretion of the court, be issued in the first instance. But in the present case it appears, both by the pleadings and the evidence, that there was a very serious controversy as to the facts, and while it may be that the testimony preponderated in favor of the conclusion reached by the learned judge, it could not be said that it was so clear and so free from conflict as to put the right of the relator beyond question. Even assuming that the reasons assigned by the defendant for his action, were traversable, it is questionable whether the issue of fact raised by the traverse could be decided upon depositions unless by the consent or agreement of the parties, entered of record: Com. v. Thomas, 32 Pa. 218; Smith v. Com., 41 Pa. 335; Jefferson Co. v. Shannon, 51 Pa. 221.
But, passing, without further comment, all questions of practice and pleading, we come to the serious questions, namely, whether the duty of the county superintendent is purely ministerial, or whether it involves the exercise of discretionary and quasi judicial powers, and whether and to what extent the court of common pleas has revisory jurisdiction.
*513The 41st section of the act of May 8, 1854 (P. L. 626), makes it the duty of the county superintendent to examine candidates for the profession of teachers, and to give each person found qualified a certificate setting forth the branches of learning he or she is capable of teaching. The same section gives him authority to annul any such certificate given by him or his predecessor in office, when he shall think proper, giving at least ten days previous notice to the teacher and to the directors where he is employed. Sec. 11, of the act of April 9, 1867, P. L. 55, provides that no teacher shall receive from a county, city or borough superintendent a certificate as a teacher who has not a fair knowledge of certain specified branches, and the theory of teaching; “ nor shall such certificate be given to any person in the habit of using as a beverage any intoxicating drinks.” The officer who, under the law, is to decide whether the applicant has the educational qualifications specified in the first part of the section is the superintendent; and it is clear that there is no appeal from his decision in that matter to the. judgment of the court or a jury. Being forbidden by law to-issue a certificate to one who is in the habit of using intoxicants as a beverage, it is equally clear that it is within his province to see that the policy of the law in this regard is carried' out. The power to annul a certificate for proper cause would, of itself and without more,' imply a power to refuse a certificate for proper cause. The law is binding upon his conscience, and the performance of his duty requires the .exercise of judgment and discretion. To say then that his duty to issue the certificate, if he finds that, the applicant possesses the educational qualifications, is purely ministerial, is to deny to him the power-which the legislature has clearly made it his duty to exercise-when personal knowledge or a due investigation convinces him-that the applicant is otherwise legally disqualified. It seems-too plain for argument that the duty of the superintendent is-not merely ministerial.
The learned judge below concedes that, if the applicant is, a person of known immoral character or a known habitual drinker-of intoxicants, the county superintendent would have a right to refuse him a certificate. Having power for sufficient reason to-refuse a certificate, he must, necessarily, have the power—and it is his duty to exercise it—to ascertain and determine whether *514the reasons exist, for the power is vested nowhere if it is not vested in him. If this be so, the finality of his decision does not depend upon its absolute correctness. But, it is argued, the superintendent cannot arbitrarily refuse a certificate upon such grounds without giving the applicant a hearing and an opportunity to refute the charge. We assent to this unqualifiedly; but, where, and before whom is he entitled to a hearing? Manifestly the superintendent is the officer to hear and decide. Certainly no fair minded superintendent would refuse a certificate upon mere rumor, or even direct information, without giving the applicant a hearing upon a matter which so closely affects his reputation and means of livelihood; but we cannot agree that the mode and notice of hearing are regulated by the provision of the 41st section of the act of 1854 relative to the annulment of a certificate. It seems, however, unnecessary to discuss this question further. We find no allegation in the pleadings or in the evidence that the defendant refused the plaintiff a hearing and an opportunity to refute the charges; and even if that were the ground of complaint the decree was too broad..
The principles which govern the court in issuing writs of mandamus are well understood, and there is no better statement of them than that of Chief Justice Tilghman in Com. v. Cochran, 5 Binn. 87: “ Where a ministerial act is to be done, .and there is no other specific remedy, a mandamus will be awarded to do the act required; but, where the complaint is against a person who acts in a judicial or deliberative capacity, although he may be ordered by mandamus to proceed to do his 4uty by deciding and acting according to the best of his judgment, the court will not direct him in what manner to decide.” In Runkle v. Com., 97 Pa. 328, Mr. Justice Gordon said: “ When a person or body is clothed with judicial, deliberative .or discretionary powers, and he or it has exercised such powers [according to his or its discretion, mandamus will not lie to compel a revision -or modification of the decision resulting from the exercise of such discretion, though, in fact, the decision may have been wrong.” In Knarr’s Petition, 127 Pa. 554, Mr. Justice Williams said: “We have repeatedly said that the office of a mandamus is to require the performance of judicial functions, not to regulate the mental processes of the judge. If he *515refuses or neglects to hear, we may enjoin upon him the performance of that duty; but when he has heard and decided, we cannot require him, unless in extreme cases, to lay his modes of reasoning and his moral standards before us, that we may revise his discretion and substitute our own.” We shall cite a few of the many analogous cases where these principles have been applied.
It was held that the court could not legally compel commissioners of bankruptcy to sign a certificate of conformity even though an issue should be found in favor of the bankrupt, or the court on a special statement of the facts should differ from the commissioners whether there was a full, true and perfect discovery and disclosure on the part of the bankrupt: Resp. v. Clarkson, 1 Y. 46. The admission of an attorney by a court of common pleas is a judicial and not a ministerial act; it was therefore held that mandamus would not lie, although the judges expressed a very decided opinion that the common pleas had been governed by an erroneous construction of its own rule in refusing admission: Com. v. The Judges, 1 S. & R. 187. It was held, that, under the act of 1884, the county commissioners had a discretionary power in the appointment of collectors, and that, where they decided those returned by the assessor to be unfit, and appointed others, the court would not interfere by mandamus. The remarks of the court as to the duty of the commissioners to act on their own knowledge might appropriately be quoted here: Com. v. Perkins, 7 Pa. 42. In a case already cited—Runkle v. Com., it was held that under the act of 1874 a city controller was vested with deliberative and discretionary powers in countersigning warrants, and was not liable to be controlled in his judgment within the scope of his authority by the court, through the agency of a writ of mandamus or otherwise. To the same effect is Dechert v. Com., 113 Pa. 229. The same has been held in cases where public officers have had the duty to let contracts to the lowest responsible bidder: Com. v. Mitchell, 82 Pa. 343; Findley v. Pittsburg, 82 Pa. 351; Douglass v. Com., 108 Pa. 559. The general principles have frequently been applied in the construction of the liquor license laws: Raudenbusch’s Petition, 120 Pa. 329; Knarr’s Petition, 127 Pa. 554; Johnson’s License, 165 Pa. 315. Except in extreme cases the courts have refused to control the *516discretion of those to whom has been committed the execution of the common school laws of the commonwealth. Com. ex rel. Sherry v. Jenks, 154 Pa. 368; Hysong v. School District, 164 Pa. 629; Roth v. Marshall, 158 Pa. 272; Freeman v. School Directors, 37 Pa. 385; Whitehead v. School Dist., 145 Pa. 418; Wharton v. School Directors, 42 Pa. 358; School Dir. v. Anderson, 45 Pa. 388; Com. v. Shaw, 96 Pa. 268, are but a few of the many cases. Speaking of the power of a board of directors to dismiss a teacher, Mr. J ustice Clark said: “ The board, by the statute, is empowered both to employ teachers, and, for any one of these causes, to dismiss them. It would greatly impair the government and efficiency of the common schools, if the honest judgment and discretion of the board, exercised in good faith, could be reviewed and reversed by a jury. Such a policy would place the practical management and control of the schools on very precarious and uncertain ground. Every consideration of private interest, or of public policy, requires that this quasi judicial power of the board should be recognized. The absolute impossibility of placing the jury in the position of the school board, with the school and its instructor before them, demonstrates the fact that it would be unwise and impracticable to do otherwise:” McCrea v. School Dist., 145 Pa. 550. All this might be said, with equal pertinency, with regard to the action of a county superintendent in refusing a certificate for a legal reason. His duties and responsibilities are great. Upon his fearless, impartial and conscientious discharge of them must depend, to a very large extent, the efficiency of the public schools within his district. To enable him to perform them effectively, the legislature has conferred upon him powers commensurate therewith. In his province, his judgment and conscience are as free from outside control, except in the mode or for the cause prescribed by the statute, as those of a judge upon the bench; and, while we have nought to do with the policy or expediency of the law, we may remark, that the dangers which are incident to the vesting of such power in the hands of one man are inot greater than would be the evils if every unsuccessful applicant for a certificate might appeal from his decision, and have the question as to his educational or moral qualifications tried by a jury. We ought not to allow ourselves to be drawn away *517from the well settled principles governing the exercise of judicial deliberative and discretionary powers by a public officer, by the apparent hardship of particular cases. We may be sure that, if experience had shown that the power committed to county superintendents to pass upon the fitness of applicants for teachers’ certificates had been found in practice to be too great, the legislature would, before this, have applied the proper corrective.
Where the right of approving a fit and proper person to be appointed to an endowed lectureship was by statute vested in the bishop of the diocese, the duty of the bishop was described by Lord Ellenborough in terms which may fitly be used to describe the duty of a county superintendent, thus: “ to exercise his conscience, duly informed, upon the subject; to do which, he must duly, impartially and effectually inquire, examine, deliberate and decide. If the court have reason to think that anything is defectively done in this respect, it will interpose its authoritative admonition: ” R. v. Archbishop of Canterbury, 15 E. 139. That is to say, as explained in the same case, the officer may be compelled to hear and decide, but “ the court cannot say to him, ‘ approve though you do not approve; take our conscience to guide you and not your own.’”
The cases cited by the appellee’s counsel were cases where public officers were removed without a hearing—a thing which we concede cannot be done unless the officer is removable at the mere pleasure of the appointing power—-but they have no application to this ease as it is presented by the pleadings and evidence.
The decree is reversed and set aside and the peremptory writ of mandamus is quashed.