The opinion of the court was delivered by
Cunningham, J.:It is provided in article 12, chapter 110, of the General Statutes of 1901 ( §§ 7822-7829), that the township trustee, clerk and treasurer of each municipal township in the state shall constitute a board of commissioners of highways in their respective townships, and to this board is committed the care of *164the roads and bridges in their townships, and it is made the duty of the board to keep the same in repair, and to improve them so far as is practicable. It is further made their duty (§7826) that “whenever the available means at their disposal will permit, they shall construct permanent roads, beginning where most needed.” Sugar Loaf township is one of the municipal townships of Rooks county in this state. Without the authorization of the board of highway commissioners of this township, the trustee bought a bill of lumber from the Chicago Lumber and Coal Company, a corporation doing business in that county, for the purpose of constructing a needed bridge across a stream in that township. After this lumber was upon the ground and a part of it had been used in the erection of the bridge, and work upon it was in progress, the board duly met and took formal action relative to the building thereof. It ratified the work already done thereon and ordered that the bridge be .completed, at a cost not to exceed $200, and directed from what source the funds should come with which to pay for the same. The bridge was completed and is of public use and convenience, and is used by the public, and has been since its completion. This action was brought by the lumber company to recover $102, being the price of the lumber sold to the township for the purpose of building this bridge. After the evidence was all before the jury, the trial judge directed the jury to return a verdict in favor of the defendant, upon the theory that the contract for the lumber was made at a time when the township did not have the available means at its disposal to pay for the same, and that therefore such contract was ultra vires as respects the township, and plaintiff therefore could not recover.
*165There seems to be some conflict of evidence as to just "how much funds were available for road purpose at the time of the purchase of the lumber, but we assume the fact to be that there was not then enough by a considerable to pay for the bridge, or even the lumber which was bought of the plaintiff. Does it therefore follow that the highway commissioners were so utterly without power to purchase the lumber for this purpose that the plaintiff cannot recover its price after it has been used by the township? It must be remembered that the building of a necessary bridge is within the power to construct permanent roads, and that by many different sections of the statute it is made the duty of the trustee and board of commissioners of highways of any municipal township to construct, look after and keep in repair highways within such township. The general purpose is clearly and unquestionably within the scope of their powers; the act of building a bridge is not ultra vires. The statute directs the board to proceed to do so; to proceed always whenever available means at their disposal will permit. This is not a limitation upon the exercise of the power already granted, but rather a direction as to when such power must be exercised. It compels to the performance of a required act, the exercise of a given power, instead of taking away that power. It requires improvements to be made, and it is not a limitation upon the power of making them. Is it reasonable to suppose that the legislature intended by it to require one from whom the board was obtaining lumber and material in pursuance of their power to construct permanent roads to go through the accounts of the county treasurer or township treasurer, or both, to ascertain upon his peril that funds sufficient to pay for the contract were available, and perchance, if he or- the officers might *166be mistaken as to such amount, be the same large or small, that he should be defeated in a recovery for the articles furnished and which the township is using. Indeed, might it not be urged with as much show of reason that the act of constructing permanent roads would become ultra vires by the failure of the board to begin where most needed, as well as by proceeding to do so before available means were on hand; both conditions seem to be of like gravity in the statute.
It seems in this case that the township trustee', when he bought the lumber, supposed that there were available means sufficient to pay for the same, or at least that he so represented to the agent of the plaintiff.
It is a most wise and salutary rule which prohibits municipal corporations from being chargeable upon contracts made in excess of their powers to make, and to put all parties dealing with them upon an absolute knowledge of that power, and we do not wish to be understood as questioning that rule in the least; but there is a wide difference between the lack of power to do a thing and the doing of that thing in an unauthorized manner or at an unauthorized'time. Upon this subject, we quote from Dillon’s Municipal Corporations, section 936:
“When an act in its external aspect is within the general powers of the corporation, and is only unauthorized because it is done with a secret, unauthorized intent, the defense of ultra vires will not prevail against a stranger who dealt with it without notice of such intent.”
In support of this doctrine, the author cites with approval the case of Moore v. Mayor, 73 N. Y. 238, 29 Am. Rep. 134, where Mr. Justice Allen clearly draws the distinction between a total want of power and mere *167irregularities in the exercise of the powers conferred. To the same effect see Beach on Public Corporations, section 223.
Now, in this case it was beyond question within the power of the township board to build this bridge : the board was the agency created by statute for that purpose, and to which the inhabitants of the township looked for protection from defective highways by requiring it to make the same safe. In pursuance of this power, the board made the contract it did, and, relying upon it, the plaintiff parted with its property, for the benefit of the township, and it is very clear to us that the township cannot now set up its own irregularity, if irregularity it was, in purchasing the lumber before it had available means to pay for it as a complete defense to its liability therefor. Such a defense does not recommend itself as being in accordance with good law or good morals. In coming to this conclusion, we do not overlook the case of Walnut Township v. Heth, 9 Kan. App. 498, 59 Pac. 289, which holds the contrary doctrine, but the reasoning in that case does not meet with our approval.
In considering this case, we have viewed it as though the trustee had been authorized by the formal action of the board to purchase the lumber before the same was purchased, for its subsequent action in ratifying such purchase and directing the further progress of the work upon the bridge was equivalent to an order for the same in the first place. "What a corporation may legally do, it may legally ratify after it is done.
We conclude that the court below was in error in its construction of the law, and must therefore reverse its judgment and remand the case for further proceedings in accordance with the views herein expressed.
Ellis, Pollock, JJ., concurring.