The plaintiffs claim to be members respectively of the permanent force of the fire department and the permanent force of the police department of the city of Lawrence. The compensation of each member, as fixed by the city council, is $42 a week. Both plaintiffs, prior to January 13, 1935, were members of the reserve force in their respective departments. On that day, by appointment of the director of public safety of the city of Lawrence, the head of both departments (Smith v. Director of Department of Public Safety of Lawrence, 290 Mass. 307), eight reserve firemen and fifteen reserve police officers, including the plaintiffs, were promoted to the regular force. The appropriations for the year 1935 were $257,400 for salaries in the fire department and $261,700 for salaries in the police department. These appropriations were insufficient to pay the salaries of permanent members of these forces and in addition those of the members promoted to the regular forces on January 13, 1935, even if all the salaries are computed with allowance for the ten per cent voluntary reduction which was in force during 1935, to which the plaintiffs are willing to conform.
Each of the plaintiffs brought an action of contract to recover his weekly instalments of salary as a regular member of his force from January 13, 1935, through March 16, 1935. In the District Court the finding in each case was for the defendant, and the Appellate Division sustained that finding by dismissing a report. The plaintiffs appealed to this court.
A public officer has no implied right to compensation. Riopel v. Worcester, 213 Mass. 15, 17. Hartley v. Granville, 216 Mass. 38, 40. Even when compensation is provided by law, the right to recover it rests upon the statute fixing the compensation rather than upon any actual contract to pay it. Cook v. Springfield, 184 Mass. 247, 249. Police Commis*121sioner of Boston v. Boston, 279 Mass. 577, 581. Campbell v. Boston, 290 Mass. 427, 429-430. Nevertheless, although no contractual duty exists not to abolish a public office or reduce the salary attached thereto (Donaghy v. Macy, 167 Mass. 178; Seaver v. Onset Fire District, 282 Mass. 209, 216; Selectmen of Milton v. Justice of the District Court of East Norfolk, 286 Mass. 1; Smith v. Director of Department of Public Safety of Lawrence, 290 Mass. 307), the appointment by a municipality of officers whose salaries are fixed by municipal action creates a contract of a sort. As was said in Hooker v. McLennan, 236 Mass. 117, 120, “ Compensation due and payable to a municipal officer may be recovered in an action of contract. Where such officer bases his right to recompense, not merely on a statutory provision, but upon an enforceable obligation of a municipal corporation, although one entered into under statutory authority or direction, we think that the claim is one which in legal effect is upon an express contract.” Within the meaning of statutes designed to keep the expenditures of a city or town within bounds, we think that obligations to pay the salaries of firemen and police officers are liabilities incurred by a municipality.
There is no general principle of law that a city or town is not bound by a contract made in its behalf by officers duly authorized, merely because no appropriation exists out of which the contract can be performed. G. M. Bryne Co. v. Barnstable, 286 Mass. 544, 552, 553. Police Commissioner of Boston v. Boston, 279 Mass. 577, 581, 582. Decatur v. Auditor of Peabody, 251 Mass. 82, 85. But cases have arisen in which the authority of the officers purporting to contract on behalf of the municipality has been expressly made conditional upon the existence of a sufficient appropriation. Smith v. Lowell, 190 Mass. 332. Costello v. North Easton Village District, 205 Mass. 54. Adams v. County of Essex, 205 Mass. 189. And by the municipal indebtedness act, St. 1913, c. 719, which with amendments is now found in G. L. (Ter. Ed.) c. 44, such a limitation upon the authority of officers and departments of a city or town was made part of our general law.
Provision was made by § 32 of that chapter for the prep-*122oration and submission to a city council of budgets. Section 33A provides: “The budget shall include sums sufficient to pay the salaries of officials fixed by law or by ordinance, but no new position shall be created or increase in rate made during the financial year subsequent to the submission of the annual budget, unless provision therefor is made by means of a supplemental budget.” Flood v. Hodges, 231 Mass. 252. The words “subsequent to the submission of the annual budget” do not imply that before such submission there is no restraint upon the creation of new positions or the increase of salaries. Such a construction would tend to destroy the statutory system. By § 34 expenditures and liabilities in “the period after the expiration of any fiscal year and before the regular appropriations have been made by the city council,” are strictly limited to “carrying on the work” of the several departments. Such liabilities incurred must “not exceed in any month the sums spent for similar purposes during any one month of the preceding year.” The further provision for that period, allowing officers who are authorized to expend money, to “expend in any one month for any new officer or board lawfully created an amount not exceeding one twelfth of the estimated cost for the current year,” does not apply to an increase in the number of an existing force of officers. Such an increase comes rather within the provision of § 31 that “No department of any city or town, except Boston, shall incur liability in excess of the appropriation made for the use of such department,” with an exception immaterial to this case. A contract made in violation of this provision is not binding upon the municipality. Flood v. Hodges, 231 Mass. 252. Dyer v. Boston, 272 Mass. 265, 274. Remington Typewriter Co. v. Revere, 285 Mass. 1. See also Decatur v. Auditor of Peabody, 251 Mass. 82; Parkhurst v. Revere, 263 Mass. 364. One who contracts with a public officer must ascertain the limits of his authority. Dyer v. Boston, 272 Mass. 265, 274.
In determining whether a liability incurred is in excess of the departmental appropriation, the amounts needed for the satisfaction of all preexisting contracts, including the salaries for the whole fiscal year of persons already in *123office at the time of the incurring of the liability in question, must be deducted from the appropriation. Costello v. North Easton Village District, 205 Mass. 54, 58, 59. Flood v. Hodges, 231 Mass. 252. Shannon v. Mayor of Cambridge, 231 Mass. 322. Dyer v. Boston, 272 Mass. 265, 274, 275. Burt v. Municipal Council of Taunton, 275 Mass. 535, 540. Compare Adams v. County of Essex, 205 Mass. 189, 198, 199.
The insufficiency of the appropriation invalidated the appointments of the plaintiffs, and left them without right to salary. They cannot recover salary for the period between their appointments and the making of the regular appropriations, under the provisions of § 34 permitting the “carrying on” of the work during that period, even though there was a month in 1934 in which as much' was expended for salaries as would be required to pay the monthly salaries of the men promoted on January 13, 1935, in addition to those of the members already in office. The plaintiffs are claiming salaries as regular members under permanent appointments, which, at least as salaried appointments, were invalid from the moment when they were made. Nothing in the requests for rulings requires further discussion.
Order in each case dismissing report affirmed.