delivered the opinion of the Court,
This writ of error is taken to the order and decree of the Court of Common Pleas No. 2, of Philadelphia, awarding a writ of peremptory mandamus. The relator, T. P. Smart, was a contractor of the said city, and the respondent, Robert P. Dechert, controller of the city and county of PliiladelphiaThe alternative writ recited that under authority of an ordinance passed June 24th, 1881, the relator had constructed a *235sewer for the city, that certain property on the line was not subject to assessment or municipal charge for the construction, and that by an ordinance approved June 9th, 1885, the chief engineer and surveyor was directed to draw, and the city controller authorized to countersign, a warrant for $600, to pay for the construction of said sewer in front of the property referred to; that the chief engineer had drawn the warrant as directed, but the controller had refused to countersign it, and had returned it to the chief engineer, and that the relator had no specific remedy at law for the grievance thus sustained. The controller was, therefore, commanded to countersign the warrant or show cause why he should not.
The controller made a formal return to the alternative writ, and to that return the relator filed a demurrer. All matters, therefore, sufficiently set forth in the return must be taken for true, and these with the material allegations of the writ, not traversed by the return, constitute the substantial facts upon which this case is to be determined.
The respondent in his return to the writ as the controller of the city and county of Philadelphia, claims to exercise a discretionary power under the law in refusing to countersign the ■warrant referred to, and that in the exercise of that discretion, he was not subject to the direction of the Court; further, that under the provisions of the ordinance of city councils, and by the terms of the contract under which the work was done, the construction of the sewer had been fully paid for; that the city owed no debt, and was under no obligation whatever to the contractor therefor, that the appropriation was therefore not authorized by law, and that in the proper exercise of bis duties as controller, he was required to withhold his signature from the warrant.
It is well settled that mandamus will lie to compel the performance by public officers of duties purely ministerial in their character, but it is equally well settled that as to all acts and duties necessarily calling for the exercise of judgment and discretion on their part, mandamus will not lie. Whilst the writ may perhaps be awarded to set the latter class of officers in motion, and to compel action upon the particular matters over which they may have jurisdiction, it will in no manner interfere with the exercise of that discretion nor control or dictate the judgment, or decision which shall be reached. It is unnecessary to quote authorities in support of this plain and well established principle of tlie law; such has been the uniform course of all the decisions, and in this case we do not understand the doctrine to be denied. The question for our consideration, therefore, is whether or not the controller of the city and county of Philadelphia in the exercise ’ of his *236officg, when called upon to countersign a warrant, is invested with a discretionary power in the performance of that duty, or whether his duty in this respect is merely ministerial.
On May 12th, 1866, a general ordinance of councils was approved, providing, for the construction of sewers in said city, that the owners of ground on the line thereof should pay at the rate of $1.25 per foot front; and that bills of assessment at this rate in each case should be prepared by the city. The ordinance provides further as follows: “It shall be a condition of the contracts awarded under the provisions of this ordinance that the contractor shall accept assessment bills as so much cash paid by the citj on the said contract, and that he shall collect the same at his own cost without recourse to the city in any event.” By ordinance approved February 16th, 1869, the rate was increased to $1.50 per foot front.
On June 24th, 1881, an ordinance was approved authorizing and directing, inter alia, a sewer to be constructed on Sixty-third street, between Market and Arch, and providing “ that it should be a condition of the contract, entered into on behalf of the city, for the construction of the several sewers therein authorized, that the contractor should accept the sums assessed upon and charged to the properties lying on the line of said sewers, in manner and form authorized by ordinance, entitled, etc., approved May 12fch, 1866, and the supplement thereto approved February 16th, 1869.”
On the 19th August, 1881, T. P. Smart, the relator, under a written contract with the city, agreed to construct the sewer on Sixty-third street as authorized by the ordinance of 24th June, 1881; the price and mode of payment were agreed upon as follows: “For sewer, three feet in diameter, per lineal foot and man-holes, the sum of the assessment bills given by the survey department against the properties or premises fronting on the streets on which the sewer forming the subject of this contract is to be constructed, which said bills the said party of the second part agrees to accept in full for all work done under this contract. The said party of the second part further agrees to make no claim whatever upon the city of Philadelphia, excepting upon bills against city property,it being distinctly understood and agreed that the city of Philadelphia does not in anywise guarantee any of the said bills to be good and collectible. Payments for the entire work shall be made by the chief commissioner of highways upon estimates signed by the chief engineer and surveyor in assessment bills, prepared as specified in section 2 of ordinance ‘regulating the assessment upon property for the construction of sewers,’ approved May 12th, 1866, and warrants upon the city treasurer to an amount as authorized by *237ordinance approved April 3d, 1868, in payment for the street intersections, manholes, and legal deductions. All of which payments shall be received as so much cash, and be collected without recourse to the city of Philadelphia; but for the purpose of the better enabling the contractor to collect the same, the name of the said city may be used, and all her legal remedies, whether by bill or otherwise, employed.”
Smart constructed the sewer, and, it is admitted, received the assessment bills in full for the work, according to contract, including two against the Grandom Institute, the property on the east side of Sixty-third street,extending along the whole length of the sewer. He subsequently, on February 1st, 1882, filed in the name of the city of Philadelphia, to his own use, two claims for the construction of the sewer against the Grandom Institute and the said property, which claims are entered in the Court of Common Pleas No. 4, of Philadelphia. Having issued writs of scire facias, the Grandom Institute pleaded nonassumpsit, and that the property was rural; the relator replied that the property was not rural. The relator ordered the cases on the trial list, but no further proceedings appear of record, and the suits remain pending and unsatisfied. By the express terms of the general ordinance of May 12tb, 1866, as well as by the ordinance of June 24th, 1881, under and subject to which the contract was made, as well as by the conditions of the contract itself, payment was to be made in assessment bills, which were accepted as cash, to bo collected at the contractor’s cost, and without recourse to the city in any event. It was expressly provided, also, that the city did not “in any wise guarantee any of the said bills to be good and collectible.” It is plain, therefore, that the city owed Smart nothing for the construction of the sewer; he had been paid in full four j’ears before the ordinance was passed authorizing the warrant, and paid precisely as tile contract provided.
It is not pretended that there remained any obligation on the part of the city, moral or otherwise, to pay Smart in any other way. There was no mistake, no change of circumstances, or an3 other intervening matter wliich caused the contract to operate oppressively on the contractor; the parties stood on equal ground, no advantage was taken in the contract, and the law, as well as the facts, was presumably as well known to one pai^r as to the other.
When this warrant was presented to the controller for his signature, what was his duty with reference to it? The duties of the controller, in this respect, are defined in various Acts of Assembly, as follows
Act 2d February, 1854, see. 12, P. L., 30: “He shall countersign all warrants on tlie city treasury, and shall not suffer *238any appropriation made by the city councils to be overdrawn, and shall perform all the duties now enjoined by law on the county Auditors. He shall superintend the fiscal concerns of the cityr in such manner, and make reports thereon at such times as shall be prescribed by ordinance.”
Act 21st April, 1855, sec. 21, P. L., 269: “It shall be a misdemeanor in office for the controller of the city to pass, or the treasurer of the city to pay, any bill or order for any object not authorized by law.”
Act 13th May, 1856, sec. 24, P. L., 572: “It shall be lawful for the city controller, and his duty, whenever required by any citizen, to administer an oath or affirmation to any person presenting a bill against the city as to its accuracy, the prices actually paid, ,or contracted to be paid therefor, whether others and who are interested therein, and as to whatsoever matter he may deem needful to protect the interests of said city.”
Act 13th May, 1856, sec. 29, P. L. 573 : “ The city controller shall be and he is hereby required to keep separate accounts for each specific or separate item of appropriation made by the city councils, to each and eveiy department of the city, and. shall require all warrants to state particularly against which of said items the said warrant is drawn ; and he shall at no time permit any one of the items of appropriation to be overdrawn, or the appropriation for one item of expense to be drawn upon for any other purpose by any one of the departments than that for which the appropriation was specifically made; he shall, upon receiving a bill or warrant from any one of the departments, proceed immediately to examine the same, and if the said bill or warrant contain an item for which no appropriation has been made, or the appropriation for which is exhausted, or to which, from any other cause, he cannot give his approval, it shall be his duty immediately to inform such department, and the warrant therefor shall not be issued unless by special authority from the city councils.”
By the Act of June 11th, 1879, P. L., 130, the controller is directed not to countersign any warrants until councils have passed the appropriations necessary for each department, and the total of all appropriations, estimates, and obligations, is within the estimate of the income of the city; he is also forbidden to countersign any warrant for the expenditure of money without a previous appropriation.
It will be observed that the warrant was from “one of the departments ” of the city government, the department of survey's; it was drawn by the chief engineer and survej'-or, against a particular item in the annual appropriation. It was issued, it is true, pursuant to an ordinance of councils, but all *239warrants may be said to be so drawn. The power to raise money for city purposes, and also the power to disburse it, subject to certain restrictions, is vested in the city councils, and the warrants, which issue from the several departments, are drawn up under such regulations of the councils as may best serve the public couvenience and promote the dispatch of business.
It will also be observed that the ordinance of June 9th, 1885, did not, in terms, authorize the issue of a warrant to Smart, the relator; it directed the chief engineer and surveyor to draw “a warrant, to the amount of 1600, for the construction of a sewer on Sixty-third street,” etc.; it did not name the contractor, or other person, to whom the money was owing; it simpN authorized the application of a portion of item 33, of the annual appropriation, to a particular purpose, but did not designate the party or parties entitled to receive it.
Upon receiving this warrant from the department of surveys, it was the controller’s duty to “proceed immediately to examine the same,” and if it contained ail item for which no appropriation had been made, or for which the appropriation was exhausted, “ or to which, from any other cause,” he could not give his approval, it was his duty immediately to inform such department, and the warrant therefor could not again be issued from the department, and presented for his signature, unless by special authority of councils.
It was his duty in any case, before countersigning the warrant, to know that the appropriation necessary for each department had been made, and that the total was within the estimate of the income, as required by the Act of 1879; to be satisfied that the warrant covered items for which appropriations had been made, and that these appropriations had not been exhausted, as required by the Act of 1856; these inquiries, as they involved no particular exercise of discretion, are perhaps of a clerical, and therefore of a ministerial character only. But other duties devolved upon him ; as the superintendent of the fiscal affairs of the city, (Act 2d February, 1854,) it was his duty to do what he might “ deem needful to protect the interests of the said city.” (Act 13th May, 1856.) • To this end (Act 2d February, 1854), he was invested with all the powers, and directed to perform all the duties, enjoined by law on county auditors; and as a legal sanction to the just and full performance on bis part of these duties, in the interests of the city, it was declared (Act 21st April, 1855), to be a misdemeanor in office, and to subject him to the pains and penalties of the criminal law, if be should “ pass any bill or order for any object not authorized by law.”
*240It is plainly then the duty of the Controller with due discrimination to determine what “objects” are “authorized by law” for appropriation of the city moneys; he is guilty of a misdemeanor in office if he does not, and the discharge of this duty necessarily calls for the exercise of judgment and discretion on his part. It is his duty, of course, to respect the contracts lawfully made on part of the city, and to discharge the legal obligations of the city, by countersigning warrants, regularly drawn in payment thereof, but it must be conceded that he was not bound to do what in his judgment was by the law positively forbidden.
Possessing all the powers of the county auditors, it was his duty to audit, settle and adjust the accounts of the city, and in so doing he could not with propriety or consistency reject a claim which had been previously approved. Iiis jurisdiction as Controller, in the performance of the duties of the county auditors, was as full and complete as that of the courts, and he was entitled to exercise these important functions free from all interference. The Court might, when a proper case was presented, correct an error in judgment on part of the Controller, but they would not bj mandamus interfere in advance with that discretion which it was his right and duty freely to exercise, or dictate the decision which, in a given case, he must reach.
In the event of the Controller’s refusal to countersign any warrant, the Courts of the Commonwealth are open for vindication of the claimant’s rights as against the city, and if these alleged rights are submitted to the decision of a Court of competent jurisdiction, and are there finally adjudicated in his favor, either the neglect of councils to provide for payment, or the refusal of the Controller to countersign a warrant in discharge of a legally ascertained liability of the city, would present a different question here.
In Runkle v. Commonwealth, 1 Out., 328, the specific question was as to the duties of controllers of cities of the third, fourth and fifth classes, under the Act of 23d May, 1874, yet that case, and the case in hand, are precisely alike in this, that the city controller in both instances was expressly authorized to perform all the duties enjoined by law on county auditors. In delivering the opinion of the Court in that case our brother Gordon says:—
“ Upon him also is imposed ‘ all the duties now enjoined on county auditors by the laws of this state, and he shall scrutinize, audit and settle all accounts whatever in which the city is concerned.’ ,
“ But the powers of county auditors are as full and complete, *241within their jurisdiction, as are thé powers of Courts. They may issue subpoenas for parties and witnesses; they may compel the production of books and papers, administer oaths, compel the attendance of witnesses, and punish contempts by attachment. With this judicial and deliberative power, the controller of the city of Reading is clothed, and of necessity lie must be left free to exercise his own judgment. But how can he exercise these important functions if he is to be controlled in his judgment by the Court of Common Pleas, or by any other court?
“In the present case Controller Runkle, for reasons satisfactory to himself, refused to approve the warrants drawn in favor of Keppelman; this he had a right to do; this it was his duty to do, if he believed the interests of the city would be protected by the refusal of such approval, and we know of no power in the Common Pleas to substitute its judgment for that of this officer. Had the controller refused to act in the matter at all, the Court by its mandamus might have compelled him to act, hut this was all it could do, but after he had acted, and had refused to sanction the warrants it was a mere piece of usurpation on the part of the Court to attempt to compel him to revise his decision, and adopt its judgment in preference to his own.
“ The rule governing cases of this kind may be stated as follows: Where 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: Griffith v. Cochran, 5 Binn., 87; Commonwealth v. Perkins, 7 Barr, 42; Commonwealth v. Mitchell, 1 Norris, 313.”
The office of the city controller is certainly one of the gravest importance and responsibility; it is not to be supposed that the powers conferred will be prostituted to any purpose of injustice or oppression, but will be exercised in good faith for the protection of the people. We think the office was designed to operate, in the manner indicated, as a cheek upon the city councils, in the appropriation of the public moneys. The city corporation holds its moneys in trust, to be used for legitimate corporate purposes only; there is no authority to apply them otherwise or to bestow them upon those to whom the city was under no obligations whatever.
It is the controller’s plain duty, as the representative of the people, and of the city in its corporate capacity, to see to it-that it is not applied to “ any object not authorized by law,” *242and if in his judgment the warrant in question was so issued, he was justified in refusing to countersign it.
The judgment is reversed, and judgment is now entered upon the demurrer in favor of the respondent.