This suit was instituted to recover of the city of Bryan the reasonable value of professional services rendered by the law firm of Page & Sims, in preparing a legal opinion as to the validity of a certain election for municipal officers in said city.
The charter of the city (section 4) provides that “ the common council, by ordinances, shall have power as follows ”: * * * “Thirty-fifth. In relation to the employment of legal counsel for the assistance of the common council, and to prosecute in behalf of the corporation in criminal cases, and to institute and defend civil suits in their behalf.” The *535claim of plaintiffs does not rest upon any ordinance of the common council, but upon the action of the mayor in employing them to prepare the opinion, and the subsequent action of the council in availing themselves of the opinion. The evidence not only negatives the qiassage of any ordinance authorizing or ratifying the employment, but it also negatives any action of the council whatever to that effect, unless such action be inferred from the fact that the opinion was read at a meeting of the council, in connection with an opinion from other attorneys, and that the council acted in accordance with these opinions, holding the election invalid.
We are of opinion that neither the mayor nor the common council were authorized to bind the city by contract for legal counsel for their assistance, no ordinance having been passed in relation to such employment.
The charter gave the power to employ legal counsel, but prescribed that the power be exercised by, or at all events in accordance with, an ordinance of the common council. The charter—the source of all the power of the mayor or council over the subject — having limited the mode of its exercise, they could not in a different mode make a valid contract; nor could they by any subsequent approval or conduct impart validity to such contract. As without an ordinance they were without power to bind the city by an express contract to pay for legal services, the law would not imply any such contract against the city. “ The law never implies an obligation to do that which it forbids the party to agree to do.” (Brady v. Mayor of New York, 16 How. Pr., 432, as cited in Zottman v. San Francisco, 20 Cal., 105.)
If municipal corporations can be held liable on an implied contract where the charter has withheld the authority to make an express contract, it is easy to evade and render useless such restrictions in their charters. The claim of plaintiffs, that the city of Bry^n was bound to pay them because of their employment by the mayor and because of the use made of their opinion by the common council, cannot be main*536tained. They were hound to know of the limitations on the authority 01 these officials, and their services were rendered at their own hazard. (Zottman v. San Francisco, 20 Cal., 105; Bladen v. Philadelphia, 60 Penn. St., 464; City of Leavenworth v. Rankin, 2 Kan., 357; 1 Dill. on Mun. Corp., sec. 373.)
The case was submitted to the court without a jury, and the court gave judgment for plaintiffs. In accordance with the view which we have taken of the construction of the charter and of the law of the case, the judgment is reversed, and judgment is here rendered in favor of the city'of Bryan that ,the plaintiffs take nothing by their suit, and that the defendant recover of the plaintiffs all costs in the court below and in this court.
Reversed and reformed.