This, was an application for a writ of mandamus. The relator, A. E. Gray, states in his petition, that on the 15th day of June, 1870, he was duly and legally appointed sheriff of Newton county, and that he presented his bonds as such sheriff and tax-collector for the proper amounts, with good and sufficient sureties therein, to O. S. Swan, clerk of the chancery -court of said county, for his approval, who refused to approve the same.
To this petition the defendant, 0. S’. Swan, demurred, on on the ground that the petition does not show that the appli*396cant is entitled to the relief he prays. The demurrer -was overruled by the court, and thereupon the defendant asked leave to file an answer to the petition, which was refused by the court, and upon motion of the relator, a peremptory mandamios was issued. And from this action of the court, the defendant prosecutes here this writ of error.
According to the English practice, the proceedings in. mandamus were formerly commenced by a motion in court, the grounds for which were supported by the production of affidavits, asking for a rule against the defendant, to show cause why the writ of mandamus should not issue. The hearing on the motion was ex parte^ and no previous notice to the opposite party was necessary.
The more common practice in this country is to file a formal petition, alleging in detail the grounds of application, and praying for a writ of mandamus to be issued. This petition is sworn to by the applicant, or supported by the affidavits of others. If this petition makes a prima faeie case, an alternative writ of mandamus is issued, commanding the defendant to do the thing required, or to show cause why it should not be done. To this writ the defendant must either do the thing required, demur or make return. If the demurrer is sustained, that disposes of the application, and a peremptory mandamus is denied. But if the demurrer be overruled, then the defendant must make return, denying the allegations of the writ, or setting up new matter constituting a defense to the relator’s claim.
And as we have no statutory provisions regulating the proceedings in cases of mandamus, we are to be governed by the principles of the common law, by which the return to a mandamus in the alternative is to be taken as true, and the aggrieved party is left to his action for a false return. And the court must grant or refuse a peremptory mandamus-, according to the rules of law, applicable to the facts set forth in the return. If the return be insufficient, or falsified in an action on the case, the court regularly grants a peremptory mandamus. 6 Bacon’s Ab., 452.
*397In a return to a mandamus, the defendant must either deny the facts stated in the alternative writ, or show other facts sufficient to defeat the relator’s claim. Commercial Bank of Albany v. the Canal Commissioners, 10 Wendell, 25.
The petition for a mandamus is an ex pcorte proceeding, and if it make a prima faoie case, the court awards an alternative mandamus. This brings the defendant into court, and he must answer the writ, either by showing that he has performed the act required to be done, demur to the writ, which demurrer, if sustained, puts an end to the application, or make return denying the allegations of the writ, or setting up new matter constituting a defense to the relator’s claim.
This mode of proceeding was entirely ignored by the counsel and the court in this case, and a peremptory writ of mandamus was issued upon the mere ex parte application of the relator, without giving the defendant an opportunity to show cause why it should not issue. This is error.
It is made the duty of the clerk of the chancery court to approve the bonds of all county officers. Acts of 1870, § 42, p. 59. This is in the nature of a judicial act, requiring the exercise of judgment and discretion in the performance of it. It is not a ministerial duty; and the court could not, by mandamus, act directly upon the officer, and guide and control his judgment or discretion in the matter entrusted to him in the discharge of his official duties. The principle of the case of Decatur v. Paulding is decisive of the present one. In that case, in 14 Peters, 497, the court distinguish it from the case of Kendall v. the United States, 12 Peters, 524, in which there was a mandamus to enforce the performance of a mere ministerial act, not involving, on the part of the officer, the exercise of any judgment or discretion.
When a court or officer has a discretion, the court will not grant a mandamus to control that discretion. 6 Bacon’s Ab ,. 420, 433 ; ex parte Jesse Hoyt, 13 Peters, 279.
When a judge acts in his judicial capacity, as deciding on the propriety of issuing a warrant, the supreme court will not grant a mandamus to compel him to decide according to the *398dictates of any judgment but his own. Postmaster-general v. Trigg, 11 Peters, 173; ib., 573; 8 ib., 291; 6 ib., 661.
In this case we think the court acted prematurely in granting the peremptory mandamus.
The judgment must be reversed and the cause remanded.