delivered the opinion of the Court. The defendants admit that the services of the plaintiffs, and the expenses by them incurred, for which they demand payment, were performed and incurred at the request of the town, and that their bills therefor were allowed at a legal town meeting. They nevertheless deny their legal liability to pay, on two grounds : 1. Because, as it is said, the town was not authorized by law (o rake money for the payment of these services and expenses, snd that the vote to pay for them was void ; and 2. That the onsidoration was illegal.
*568Neither of these grounds of defence can, as we think, be successfully maintained.
' It is undoubtedly true, as was decided in Stetson v. Kempton, l3 Mass. R. 272, that towns have not an unlimited authority, inXtheir corporate capacity, to raise money and to cause it to be assessed upon the polls and estates of the inhabitants. Such an authority would be dangerous, and it has been limited by the statute of r¡785, to the cases of providing for the poor, for schools, for the support of public worship, and other necessary charges. It may* be that towns are not authorized to make any contract for the payqnent of money, which they are not authorized to raise money to'".discharge by a tax on the inhabitants. This question, however, ^was left undecided in the case of Stetson v. Kempton ; nor is unnecessary to decide it now, as we are of opinion, that the town \is authorized to raise money by a tax for the payment of these ¿charges.
It is the duty of a town to repair all highways within its bounds, at the expense of the inhabitants, so that tibe same may be safe and convenient for travellers ; and we thinlcXjt has the power, as incident to this duty, to indemnify a surveyorXor other agent against any charge or liability he may incur in the''¿o»id fide discharge of this duty, although it may turn out on investigation, that he mistook his legal rights and authority. Thje act by which the surveyor incurred a liability, was the digging a ditch, as a drain for the security of the highway ; and if; it was done for the purpose of raising a legal question as to l’jie bounds of the highway, as the defendants offered to prove,-'at the trial, the town had nevertheless a right to adopt the act, ’for they were interested in the subject, being bound to keep . the highway in repair. They had, therefore, the right to determine whether they would defend the surveyor or not; land having determined that question, and appointed the plaintiffs a committee to carry on the defence, they cannot now be allowed to deny their liability, after the committee have paid the charges incurred under the authority of the town. The town had a right to act on the subject matter, which was within their-jurisdiction, and their votes are binding and create a legal obligation, although they were under no previous obligation to indemnify the surveyor. That towns have an authority to defend *569id indemnify their agents, who may incur a liability, by an inadvertent error, or in the performance of their duties imposed on them by law, is fully maintained by the case of Nelson v. Milford, 7 Pick. 18.
That case also is decisive as to the other ground of defence, in relation to the consideration. In mat case it was decided, that a promise to refund money paid by assessors on an illegal assessment of a town tax made by them, was a valid contract; and, in the present case, the plaintiffs’ only claim is for services rendered and money paid for the town at their request. No illegal act is imputed to the plaintiffs; and, when they were appointed a committee, they had no knowledge that any error had been committed by the surveyor. They have acted in good faith, and are clearly entitled to be compensated and reimbursed for their services and expenses.
Motion to take off the default overruled.