The plaintiff seeks to recover of the defendants for professional services, as an attorney and counsellor at law, in defending a suit in equity instituted against the town of Stoughton, having for its object the restraining of the defendants from distributing their portion of the proceeds of the surplus revenue contrary to law.
The ground now taken is, that these services, having been rendered in aid of the defendants, who were attempting to do an illegal act, furnish no ground for sustaining an action at law to recover compensation therefor.
This case does not fall within the principle of those decisions, where an express promise to indemnify an agent for a breach of duty has been held void. Nor does it belong to the class of cases, where the contract of a town has been held *392invalid, on the ground, that the subject of the contract was foreign to the duties and powers of towns, as in the cases of Stetson v. Kempton, 13 Mass. 272; Parsons v. Goshen, 11 Pick. 396. Cases may and often do arise, in which towns may assume to indemnify their agents, where the result of a trial at law clearly shows, that the acts were illegal, provided such acts were done by the agents in the bond fide discharge of their duty. Bancroft v. Lynnfield, 18 Pick. 566; Nelson v. Milford, 7 Pick. 18.
It is incident to towns to be the subject of suits at law and in equity. Being subject to such suits, the right necessarily attaches to employ legal counsel to aid in prosecuting or defending them. The right of counsel so employed, to recover compensation for services rendered, does not depend upon the result of such suit, and whether the town were found to have acted legally or illegally, in the matter in controversy, or whether they had or had not a valid claim, which they sought to enforce. The right to fees for such services arises, because it is thus incident to towns to be the subject of suits at law and in equity; and one employed in their behalf may well recover his reasonable compensation therefor, irrespective of the merits of the controversy; and although it should appear, that the proceeding was a bill in equity to restrain the town and its officers from illegally disposing of the moneys or property of the town to some foreign and unauthorized object, the result would be the same, as to the right of the counsel to recover their fees for professional services.
The only remaining inquiry is, whether the plaintiff was thus employed by the defendants. The vote of the town authorized the defending of any suits that might arise from the attempt to distribute the surplus revenue. Nor is it any valid objection, that this vote was passed before any suit was instituted. The more usual mode is to pass a vote to defend a suit already commenced ; but it is competent for a town, at the commencement of its political year, to appoint an agent to defend all suits that may be instituted during the year * or at any legal meeting called for the purpose, to pass a similar vote, as to any particular case expected to arise during the year. Exceptions overruled.