This is a petition for a writ of mandamus to require the auditor of the city of Northampton to approve a payroll submitted to him by the board of health, to issue a warrant for the payment of the salary alleged to be due the petitioner, to approve such payrolls as may have been, or may be from time to time in the future submitted to him by said board and to issue warrants for the payment of such salary as may be shown to be due the petitioner by such payrolls. The writ is also asked for the further purpose of requiring the director of civil service for the Commonwealth to refrain from interfering with the city auditor in the performance of his duties and also from commanding or advising said auditor to refuse to approve payrolls submitted by said board or to issue warrants for the payment to the petitioner.
The case was heard upon the petition, answer and replication, and a judge of the Superior Court denied the petition as a matter of law subject to the petitioner’s exception.
The merits of this case cannot properly be determined in this form of proceeding. If the petitioner is entitled to the salary that he claims, he is entitled to recover it by action at law against the city. There is the well settled rule of practice that the extraordinary remedy provided by a writ of mandamus will not be permitted where there is other relief afforded either by the common law or by special provisions of statute. County Commissioners of Essex v. Mayor of Newburyport, 252 Mass. 407, 410, and cases cited. It is granted only where it is necessary to prevent a failure of justice, and where there is no other adequate and effectual remedy. Amory v. Assessors of Boston, 306 Mass. 354, 357-358, and cases cited.
The petitioner alleges that he was nominated and appointed as inspector of slaughtering for said city under the provisions of G. L. (Ter. Ed.) c. 94, § 128 (see G. L. [[Ter. Ed.] c. 129, §§ 15-17); that he duly qualified for such position; that the board of health caused a payroll to be pre*274pared upon which his name appeared as inspector of slaughtering for the period from August 21 to August 31, 1942, at an annual salary of $950, the payroll showing that salary in the sum of $28.63 was due the petitioner; that the payroll was approved by said board of health and the mayor of the city, but that the auditor refused to issue a warrant for the payment of salary shown to be due on said payroll, or for any subsequent period, for the reason that the petitioner’s name does not appear on a roster furnished the auditor by the director of civil service, and that under the provisions of St. 1941, c. 165, § 1, the auditor was unable to issue a warrant to pay the petitioner. The petitioner alleges further that the director of civil service, who is a respondent, has asserted and continues to assert that he was not appointed to the position of inspector of slaughtering in accordance with the laws of the Commonwealth. The answer of the director is to the effect that the position of inspector of slaughtering is subject to the rules and regulations of the civil service commission and that the petitioner’s appointment was invalid as being contrary to the provisions of G. L. (Ter. Ed.) c. 31. The answer of the board of health and the auditor alleges that the petitioner was duly appointed and qualified as inspector of slaughtering; that his appointment is not subject to the provisions of said c. 31; that he is not an employee of the city, but that he is the head of one of its principal departments. The petitioner’s replication makes similar assertions, and also alleges that a specific appropriation was made in the budget for 1942 for the purpose of paying the salary of the incumbent of the office of inspector of slaughtering; and that the salary of such office is established by the city ordinances.
If the petitioner is entitled to the salary that he claims, the amount thereof being fixed by ordinance and an appropriation having been made therefor, he is entitled to recover his salary by an action at law against the city. The case of Wheelock v. Auditor of Suffolk County, 130 Mass. 486, was a petition for a writ of mandamus against the auditor of Suffolk County and the board of aldermen, acting as county commissioners, to compel them to audit a bill of the peti*275tioner for services in the commitment of insane persons to hospitals after the provisions of St. 1879, c. 195, took effect. The respondents refused to allow the petitioner’s account solely on the ground that, as matter of law, the county was under no legal obligation to pay for the services in question. The report of the case to this court provided that, if the county was liable to pay for the services, the writ prayed for was to issue, “if the same was a proper remedy”; otherwise, the petition was to be dismissed. The opinion, rendered by Chief Justice Gray, was that the merits of the case could not be properly determined in that form of proceeding; that the provision contained in St. 1879, c. 256, § 1, that all bills for county salaries, expenses and disbursements should be examined, audited and allowed by the auditor prior to their payment, was intended to regulate the internal administration of municipal affairs and would not deprive the creditor of his right of action, at least after his claim had been presented to the auditor and to the board of aldermen, acting as county commissioners, and they had refused to allow it. It was also held that the petitioner, “having thus a clear, direct and adequate remedy by action at law, no case is shown for the exercise of the extraordinary jurisdiction of this court to issue the writ of mandamus.” (Pages 487-488.) The case of Daly v. Mayor of Medford, 241 Mass. 336, was a petition for a writ of mandamus commanding the auditor of the city to include the plaintiff’s name in his salary draft and commanding the mayor to approve it. It was there sai,d at pages 339-340: “The requirement of the ordinance that all drafts upon the city treasurer for the payment of money shall be signed by both the mayor and city auditor before, being paid does not have the effect of enabling a party to. try out the merits of an action at law in a petition for a writ of mandamus. The refusal of these officers to perform a purely ministerial duty does not affect the legal liability of the city on a claim otherwise fully, established.” The petition was dismissed. It was pointed out in Police Commissioner of Boston v. Boston, 279 Mass. 577, that in Lattime v. Hunt, 196 Mass. 261, a police officer, petitioning for a writ, of *276mandamus to restore him to his office, though granted the writ for that purpose, was remitted to an action of contract to recover his accrued wages. (Pages 582-583.) The case of Godfrey Coal Co. v. Gray, 296 Mass. 323, was an action in contract begun by trustee process. The town of Milton was summoned as trustee and admitted that at the time of the service of the writ it was indebted to the defendant in a certain sum. In connection with the determining whether the trustee should be charged, it was said: “Lack of approval of payment of the defendant’s bill against the town, in accordance with . . . [G. L. (Ter. Ed.) c. 41, § 52], did not prevent the town from being indebted for money to the defendant .... Such approval was not a condition precedent to liability of the town to the defendant or even to the maintenance by the defendant of an action at law against the town to collect his bill.” (Page 325.)
Section 52 of said c. 41 provides, in part, that the auditor in cities shall approve the payment of all bills or payrolls of all departments before they are paid by the treasurer, and may disallow and refuse to approve for payment, in whole or in part, any claim as fraudulent, unlawful or excessive, and the treasurer shall not pay any claim or bill so disallowed. It was said in Lowell v. Massachusetts Bonding & Ins. Co. 313 Mass. 257, 271, that the approval of payrolls by the superintendent of streets under oath “and the certificate of the auditor provided for in G. L. (Ter. Ed.) c. 41, §§ 41, 52, were not conditions precedent to the obligation of the city to pay . . . [employees’] wages.” See Rappaport v. Lawrence, 308 Mass. 545, 549, and cases cited. The case at bar is distinguishable on the facts from Rooney v. County of Essex, 292 Mass. 473.
There are cases where, in actions of contract against municipalities to recover salary or wages or a sum alleged to be due on account of an alleged contract, the basic questions whether a valid appointment (Cook v. Overseers of the Public Welfare in Boston, 303 Mass. 544) or whether a valid contract (Bartlett v. Lowell, 201 Mass. 151) had been made, were considered in the course of determining whether the *277actions could be maintained. It is fundamental that the issues raised by such questions would have to be determined as incidents of the actions.
If the petitioner in the case at bar should sue the city to recover the salary alleged to be due, it would be an issue in the case whether his appointment to the position of inspector of slaughtering was valid and subsisting. It is not to be assumed that the city would fail to raise this issue; nor is it to be assumed that, if the question was finally decided in favor of the petitioner, the city would refuse to make other payments to the petitioner, if any were or became due. See Police Commissioner of Boston v. Boston, 279 Mass. 577.
Nor is it to be assumed that the director of civil service would fail to recognize a final decision, even if it was adverse to the contention made by him in the case at bar. General Laws (Ter. Ed.) c. 31, § 31B, inserted by St. 1941, c. 165, § 1, provides, among other things, that the director of civil service shall keep a roster of all persons in the classified civil service of each city and of persons whose employment in such positions is legal; that a city treasurer shall not pay any salary or compensation for service rendered in any position in the classified civil service to any person whose name does not appear on such roster; and that a city auditor shall not authorize the drawing, signing or issuing of a warrant for such payment until the legality of the employment or appointment of such person is duly established. The roster therein referred to relates only to positions in the classified civil service and to persons whose employment in such positions is legal. The petitioner contends, and in this he is borne out by the city officials, that the position to which he was appointed is not under the civil service. The substance of the reason alleged for not approving the payroll is the contention that it is. If it is not, for all that appears he is entitled to be paid, and the question whether he was appointed to a position under the civil service, vital as it is to his right to recover the salary, will be open in an action at law.
It is true that there are cases in which this court has *278considered the rights of parties arising under petitions for writs of mandamus commanding a city official to sign a draft or warrant, or to approve payrolls for the payment of sums alleged to be due the petitioner. The case of City Council of Newburyport v. Mayor of Newburyport, 241 Mass. 575, was one of this character, and though the petitioner could not maintain mandamus, nevertheless the court did consider the question involved. The same thing occurred in Decatur v. Auditor of Peabody, 251 Mass. 82, but it was said by Chief Justice Rugg at pages 89-90: “We have treated the case on . . . [the] footing [that a decision is desired by everyone in interest] without thereby intending to enlarge the remedy by mandamus beyond the established bounds.”' In Police Commissioner of Boston v. Boston, 279 Mass. 577, it was said at page 581: “The 'extraordinary remedy provided by a writ of mandamus will not be permitted where there is other relief afforded either by common law or by special provisions of statute/ . . . Cases in which the merits have been fully argued and substantive grounds for dismissing petitions stated do not prevent the application of this principle where, as here, it is relied on by the respondents without argument upon the merits. . . . The scope of the remedy by writ of mandamus has not been enlarged by these cases.” In the case of Acford v. Auditor of Cambridge, 300 Mass. 391, a petition for a writ of mandamus to require the auditor of the city of Cambridge to approve the payment of an annuity to the petitioner, the question raised was determined and it was ordered that the writ issue. An examination of the original papers in this case discloses that no question of any other adequate remedy was raised and no reference is made to it in the opinion.
If the function of the writ of mandamus is to be preserved, the attempt ought not to be made to invoke it except upon proper grounds.
Petition dismissed.