
    HERMAN BACKHAUS and R. R. Hogue, et al., Appellants, v. T. P. LEE, F. J. McConville, Frank Goughnour, Leonard du Heaume, and Jacob Schall, as County Commissioners of Emmons County, North Dakota, et al., Respondents.
    (194 N. W. 887.)
    Counties — taxpayers held not entitled to enjoin issuance of warrants in payment for culverts and Bridges, though law under which constructed not fully complied with.
    In a taxpayers’ suit to enjoin the county commissioners from paying for culverts and bridges, it is held, for reasons stated in the opinion, that the trial court properly refused to grant an injunction.
    Opinion filed May 12, 1923.
    Counties, 15 C. J. § 353 p. 642 n. 87.
    An appeal from the District Court of Emmons County, Third Judicial District, McKenna,, J.
    Affirmed.
    Lawrence, Murphy & Nilles, for appellants.
    “The appellant bases the argument for the validity of the contract upon the powers vested in boards of county commissioners by subdivision 3 of § 82Y5, Comp. Laws, 1913, which authorizes them to construct and repair bridges, and to open, lay out, vacate, and change highways in the cases provided by law.”
    The argument is that except as may be elsewhere limited by express statutory enactment, tbe power conferred by tbe foregoing subdivision may be exercised in any manner that tbe county commissioners elect, and tliat all contracts made in exercising tbe power so conferred are valid, in the absence of fraud. Bayne v. Thorson, 37 N. D. 187; Dale-zal v. Bostick, 41 Ill. 743, 139 Pac. 964.
    “There is not, in tbe common law, a maxim more eminently just and promotive of tbe public convenience than that of 'stare decisis.’ If law, well established, may be annulled by an opinion, a foundation is laid for the most restless instability. The decisions of one court may be overruled by another court, and those of the latter will have only a transient efficacy, until some further court, dissatisfied with them, shall substitute new principles in their place. No system of inflexible adherence to established law can be as pernicious as such ceaseless and interminable fluctuations.” Palmer v. Mead, 7 Conn. 157.
    “The rule of stare decisis means in general that, when a point has been once settled by judicial decision, it forms a precedent for the guidance of courts in similar cases. It expresses the principle upon which rests the authority of judicial decisions as precedents in subsequent litigations and adherence to it is necessary to preserve the certainty, stability and symmetry of our jurisprudence.” Menge v. The Madrid, 40 Fed. 679.
    If the contracts are illegal and void, and they are each manifestly so, then the county auditor had no authority in law to issue nor has the county treasurer authority in law to pay warrants drawn on public funds, raised by taxation, in pajnnent of the contract price and as a final completion on the part of the county of such invalid agreements. Engstad v. Dinnie, 8 N. D. 1; Story v. Murphy, 9 N. D. 115; State v. Mikkelson, 24 N. D. 175.
    “The right of a taxpayer to initiate an action to enjoin municipal officials from unlawfully disbursing public funds is a right common to all taxpayers, great and small.” Engstad v. Dinnie, 8 N. D. 12.
    “The weight of modern authority, which concedes to the resident taxpayer the right to intervene on his own behalf as well as on behalf of the public, and invoke the powers of a court of equity to prevent the unlawful dissipation of the public funds, does not recognize the earlier doctrine of laches which defendants seek to invoke. In our judgment, no laches on the part- of taxpayers or others can operate to confer authority upon the officials of a corporation in a case where such officials are wholly without power to act.” Storey v. Murphy, 9 N. D. 115.
    '‘There has been a conflict of opinion on some brandies of this question; but an investigation of the authorities will show, we think, that where courts have estopped municipalities from interposing the plea of ultra vires, and from escaping the responsibility of their acts, it has been where there has been a defect in the execution of the contracts, as in the issuance of bonds, etc., and not where there has been an absolute want of power on the part of the municipality to contract.” A like distinction is recognized in the Monroe Case. There the court said: “The case of Spokane St. R. Co. v. Spokane Falls, 6 Wash. 521, 3d Pae. 1072, is not in point. The city council had the power to grant the franchise there in controversy, in the first instance. It was a case of the defective or irregular exercise of an existing power, and not a case where the power to act in the first instance was entirely lacking.” Franklin County v. Carstens (Wash.) 122 Pac. 1001.
    The corporation cannot, in any matter, bind itself by any contract which is made without authority of law or which is against public policy and all persons contracting with a corporation are bound to know its limitations in this respect. In brief, he is not only required to see to it that his contract complies substantially with the law, but “he is compelled to go further and ascertain whether his contract is authorized by the controlling law. If he fails to do this he becomes a mere volunteer and must suffer the consequences.” Roberts v. Fargo, 10 N. D. 230, 86 N. W. 726; Anderson v. International Seh. Dist. (N. D.) 156 N. W. 54; ITart v. School Dist. 24 N. D. 385.
    “Ignorance of the law excuses no man.”
    “The learned trial court found that the parties concerned in making the contracts in question acted in the utmost good faith. In one aspect of the matter, which is probably correct, the officers doubtless had no other motive than to secure for their city a bridge as cheaply as possible. In that sense a public officer may act in good faith, and yet be a wilful law breaker and guilty of fraudulent appropriation of the people’s money. If such officers knowingly or wilfully use such money contrary to law, but otherwise to accomplish a legitimate purpose in a legal sense they are guilty of acting in bad faith and of actionable misappropriation of such money, regardless of their good intentions. It will not do to allow such officers to escape responsibility in sucli cases because, though they broke the law, they acted in good faith. The law does not permit that, yet such species of good faith is one of the most common defenses insisted upon in cases of this kind.” See Chippewa Bridge Co. v. Durand, 122 Wis. 85, 99 N. W. 603, 106 Am. St. Hep. 931. See also Peet v. Leinbaugh (Iowa) 164 N. W. 128.
    Such agreements are “illegal and void” and the question of ratification cannot arise where no power existed in the first place to make the agreement. Goose River Bank v. School Dist. 1 N. D. 26; Capital Bank v. Sch. Dist. 1 N. D. 479, 48 N. W. 363; Engstad v. Dinnie, 8 N. D. 1, 76 N. W. 292; Roberts v. Fargo, 10 N. D. 230, 86 N. W. 726; Fox v. Wallely, 13 N. D. 610, 102 N. W. 161; State v. School Dist. 18 N. D. 616, 120 N. W. 555; Bartells v. Sch. Dist. (N. D.) 174 N. W. 78; Henderson v. Sch. Dist. 41 N. D. 641; Capital Bank v. School Dist. 1 N. D. 485; State v. Getchell, 3 N. D. 248.
    To give the statute the interpretation contended for, would be to invest in the county commissioners such power to construct bridges at their own discretion and will as would preclude entirely the exercise of a similar power by petition. Brady v. New York, 16 IIow. Pr. (N Y.) 432; Baltimore v. Reynolds, 20 Md. 1, 83 Am. Dec. 585; People v. Gleason, 121 N. Y. 631, 25 N. E. 4; Addis v. Pittsburg, 85 Pa. 379; Chippewa Bridge v. Durand, 122 Wis. 85, 106 A. S. R. 931, 99 N. W. 603; Keane v. New York, 88 App. Div. 542, 85 N. Y. Supp. 130; 1 Beach, Pub. Corp. § 698; 1 Dill. Mun. Oorp. 4th ed. § 466; Colorado Springs v. Coray (Colo.) 139 Pac. 1037; Cement Company v. Tracy (Minn.) 176 N. W. 189; Moore v. Hupp (Idaho) T05 Pac. 212; Me'v lye v. Lome (Ind.) 84 N. E. 782; Kelley v. Tonington (Conn.) 68 Atl. 857.
    “There can be no estoppel by conduct or ratification where there is a want of power.” State v. School Dist. 18 N. D. 616, 120 N. W. 555.
    “The retention by a municipality of the fruits of such a contract will not subject it to liability under the contract or upon quantum meruit.” Cement Co. v. Tracy (Minn.) 176 N. D. 189; Henderson v. School Dist. 41 N. D. 640.
    “But it is a remarkable claim that, where work is done under such a contract, the contract may be treated as null, and the services regarded as rendered properly. No one can use a void contract as a means of getting better terms than he could have claimed under it. The whole transaction is covered by the same taint, and must be treated as beyond the protection of courts of justice.” Eidgway v. Wetterhold (Kan.) 153 Pac. 491.
    “It has long been the conceded province of a court of equity to restrain the unlawful plans and purposes of public officials in cases where the same threaten in large measure to dissipate the public funds.”
    “Eatification presupposes the power on the part of the board to make the original contract and that body having no power there is no question here of ratification.” Pox v. Wallely, 13 N. D. 610; Storey v. Murphy, 9 N. D. lio; Colorado Springs v. Coray, 139 Pac. 1038.
    
      Scott Garrieron, Zuger & Tillotson, for respondents.
    It is to be kept in mind that the term ultra vires is used in many different senses. . . . The first of these describes a contract which is not within the scope of the powers of a corporation to make under any circumstances, or for any purpose; for example ... it was held to be wholly outside of a city’s power ... to pay money to aid in building a shoe factory within its limits; to aid in the construction of a dam for the purpose of improving a private water power, to construct a building for the use of another municipality or other third person. . . .
    The second of these meanings refers to contracts of a class which the corporations had a right to execute, but with, respect to which there has been some irregularity or defect in the actual exercise of the power . . . affecting the individual contract at issue.
    The former class is ultra vires in the primary, and really only proper, use of the term, while in the second, it is merely secondary. That is to say, an ultra vires municipal contract, in its true sense, is a contract relating to matters wholly outside the charter powers of a corporation. . . . These distinctions must be constantly borne in mind when considering a question arising out of dealings with a corporation, when an act is ultra vires in the first sense mentioned, it is generally, if not always, void in toto, and the corporation may avail itself of the plea. But, when it is ultra vires in the second sense, the rights of the corporation to avail itself of the plea will depend on the circumstances of the case. . . . Bell v. Kirkland, 102 Minn. 213, 13 L.E.A. (N.S.) 103, 113 N. W. 211; 19 E. C. L. § 352, p. 1063.
    
      The great weight of authority now denies to a public corporation in case of an executed contract which is neither malum in se nor malum prohibitum, tho right to' retain its proceeds and interpose the plea of ultra vires when sued upon the contract, and those courts which still deny the right to sue upon the contract generally permit a recovery on quantum meruit. Green v. Okanogan County, 60 Wash. 309, 111 Pac. 229, affirmed in 114 Pac. 457 on rehearing.
    “Although there may be a defect of power in a corporation to make a contract, yet if a contract made by it is not in violation of its charter, or of any statute prohibiting it, and the corporation has, by its promise, induced a party relying on its promise and in execution of tho contract to expend money and perform his part thereof, the corporation is liable on the contract.” State Board v. Citizens State N. Co. 47 Ind. 407.
    “Where a municipal corporation receives and retains substantial benefits under a contract, which it was authorized to make but which was void because irregularly executed, it is liable in an action brought to recover tho reasonable value of the benefits received.” Lincoln Land Co. v. Grant, 57 Neb. 70, 77 N. W. 349; Green v. Okanogan County, 60 Wash. 309, 111 Pac. 226, 229.
    “The illegality of the contracts does not arise from any moral turpitude. The property was transferred under a contract which was merely malum prohibitum and where the city, was the principal offender. In such case the party receiving may be made to refund to the person from whom it has received the property for the unauthorized purpose, the value of that which it has actually received.” Parkersburg v. Brown, 106 IJ. S. 487, 503, 27 L. ed. 238, 245.
    “The obligation to do justice rests upon all persons, natural and artificial, and if a county obtains the money or property of others without authority, the law, independent of any statute, will compel restitution or compensation.” Chapman v. Douglas County, 107 IT. S. 355, 27 L. ed. 381; Hitchcock v. Galveston, 96 U. S. 341; Moore v. Mayor, 73 N. Y. 238; Board v. Ry Co. 47 Ind. 407; McGuire v. Rapid City (S. D.) 43 N. W. 708; Dill. Mun. Corp. § 936; 5 Oyc. 1068; Kansas City B. & I. Co. v. Wyandotte County, 35 Kan. 557, 31 Pac. 360; Alstad v. Sim, 15 N. D. 629, 109 N. W. 66; Thompson v. Yold, 38 N. D. 569, 165 N. W. 1076 ; Lorentzen v. Stiles (N. D.) 189 N. W. 249.
   Johnson, J.

This is an appeal from the district court of Emmons county, third judicial district, from an order of the trial judge, vacating a temporary restraining order and denying a permanent injunction.

The plaintiffs are taxpayers of Emmons county and brought this suit to enjoin the issuance of warrants for disbursement of money out of the bridge fund of the county in payment for nine structures built under three separate contracts between Emmons county and the; defendant and respondent Eogel, doing business under the name of the Linton Eridgo and Construction Company. The commissioners entered into three separate contracts with the respondent Eogel for the construction of nine bridges or culverts and for the payment of the contract price, aggregating approximately $14,000. The contract for the, construction of projects A, H, and I was executed June 30, 1922; the contract for the construction of projects .B, D, E, E, and G was awarded to respondent Eogel on July 20, 1922, and on August 18, 1922, the contract ivas awarded to respondent Eogel for the construction of project O. Appellant claims that all these contracts were illegal and wholly void for reasons hereinafter stated.

Warrants were issued in full for structures referred to in the record as G, D, E, TI, and I; warrants were issued for one half of the contract price of the structure A; no warrants were issued for B, O, and E. The warrants that were issued were registered with the county treasurer. The record shows that the bill on account of the construction of structure F was allowed by the county commissioners in the sum of $1,713.76. The structures have become a part of the highway system of Emmons county and hence the materials cannot be returned to the contractor.

Two suits were commenced, but they wore consolidated below and on this appeal. Upon the trial of the issues, the court found that the bridges and structures were erected in good faith; that they are necessary; that the county received full value; that the warrants have been issued in payment thereof as indicated in the'preceding paragraph; that all the structures were completed before suits were commenced; that the taxpayers of the county now enjoy the use of the structures as a part of the highway system of the county; that the county commissioners, or some of them, with the county superintendent of highways, investigated all of the cases before the contracts were let and found that in each case the structure was necessary; that the old structures, replaced by new ones, were in bad repair, the timbers rotten and tbeir use dangerous to tbe traveling public; and that plaintiffs and other taxpayers of the county made no complaint before the suits were commenced. The court also found that, with reference to structures A, D, and E, petitions were filed as provided in §§ 1951-1953, Comp. Laws, 1913. The court further found that structures A and B are bridges, A of wood and B of concrete; that structures O, D, E, E, and H are culverts; and that structure I is a concrete abutment to a bridge; the court specifically found that the county commissioners acted in good faith and their acts were free from “any suspicion of fraud, collusion or thought on their part to do anything contrary to law.” The same is true as to the action of the county superintendent of highways, the county auditor, and county treasurer. The court further found that the structures were all properly built, strictly in accordance with the plans and specifications; that the contract price, in each instance, was the reasonable value of the structure and that Emmons county received dollar for dollar value in these improvements, and did, in fact, receive “everything that under the law it would be entitled to under legal contracts fully performed.”

It is contended by the appellants that the county commissioner's had no authority to enter into the contracts with the contractor, that the statutory requirements were not complied with and that, therefore, the plaintiffs are entitled to an injunction restraining the authorities of Emmons county from paying the warrants already drawn, and from issuing new warrants in payment of the work. The appellant thus states the gist of the action: “It is well here to bear in mind that the gist of this action is to enjoin the issuance of warrants or the payment of warrants already issued against the Emmons County Bridge Bund in discharge of the contract price and consideration for these bridges.”

Section 1951, Comp. Laws, 1913, as amended by chapter 12, Session Laws, 1919, reads as follows:

“Sec. 1951. Petition. Bids. - Whenever a majority of the freeholders of a civil township or a majority of the freeholders living within a radius of 3 miles of the proposed location, shall petition the board of county commissioners for a bridge at a specified location within such township, or within any incorporated city or village, when the cost of such bridge shall exceed the sum of $100, it shall be the duty of the board of county commissioners to view and investigate the necessity of such proposed bridge; and if such county board approves its location and building, it shall proceed to advertise in the official paper of the county, for a period of thirty days, the plans and specifications of the proposed bridge, asking for sealed bids for the building of such bridge, to be submitted to them at their next regular or special meeting, at which meeting of the board it shall proceed to examine all proposals or bids for the building of such bridge, and if such board sees fit they shall award the contract to the lowest responsible bidder; requiring such bidder to give a bond in a sum not less than the amount stipulated in the bid or contract conditioned for the faithful compliance with the terms of such bid or contract, which bond shall be approved by the board of county commissioners and filed in the office of the county auditor.
“Provided, however, that the board of county commissioners shall have the authority to refuse any or all bids received, and to proceed to construct such bridge under their own supervision, and in the manner deemed by them most expedient and to enter into contracts for the labor or material to bo used in the construction of the same.”

Section 1953, Comp. Laws, 1913, is as follows:

“Sec. 1953. Supervision and repairs of bridge. Any bridge built under the provisions of § 1951 shall be'under the supervision of the board of county commissioners, and the cost of all such building and repairs shall be estimated by the county commissioners and paid for by the county; provided, however, that should any emergency arise, requiring the immediate rebuilding or repairing of any bridges, the board of county commissioners are hereby authorized to rebuild or repair, as the circumstances require, and without advertising for bids, in case said work can be performed by a responsible party, at a price not to exceed the last bid accepted by said board of county commissioners for like work.”

The failure of the county commissioners of Emmons county to comply with the statutes may be summarized as follows: They failed in all cases to advertise for bids for a longer period than fifteen days; in some cases no petitions were filed; and in some cases there were either no bonds executed by the contractor or approved by the board, or the bond which was executed was of extremely doubtful legality and sufficiency.

It will be perceived that the construction and repair of bridges and culverts is within the general scope of the powers of the county board. Upon ibis state of the record, the question arises whether or not the plaintiff taxpayers are entitled to an injunction restraining’ the county commissioners from paying money from the county bridge fund to the contractor who has fully performed the work.

The contention of the respondent is that, inasmuch as the record discloses and the findings of the trial court show that the contracts were fairly entered into, fully and honestly performed, full value rendered to the county, and the work was necessary and the subject-matter of the contract was within the scope of the powers of the board, therefore the county, having received and accepted the benefits, and notwithstanding the fact that the contract may be illegal and unenforceable, owes at least a moral obligation to pay the actual and reasonable value of the materials furnished and the services rendered in the construction of the bridges, and that a court of equity should not enjoin such payment. On the other hand, it is contended by the appellant that the contracts are illegal and void; that the courts will not permit recovery upon an implied contract because the court will not permit an act prohibited by law to be accomplished by indirection; and that equity, at the instance of a taxpayer, should enjoin the payment of the warrants.

At the outset, it should be pointed out that this is not a proceeding by the contractor to recover upon a contract or to recover the reasonable value of the services and materials furnished Emmons county in the construction of the bridges or culverts described. It is a suit by taxpayers, invoking the equity jurisdiction of the court, to enjoin the proper officers of Emmons county from paying the respondent. Eogel, for materials and services rendered Emmons county and which, according to the findings of the trial court and the record before us, resulted in the receiving of full value under the contracts, alleged to be illegal and void, for work found to be necessary by the county commissioners, acting in good faith and within the general scope of their authority.

It is clear that the county commissioners, in entering into these contracts, failed to comply with several statutory requirements. The statutes, however, nowhere provide that in the event these provisions are not complied with, no contract shall be entered into or that, if contracts be entered into, they shall be illegal and void. This, therefore, is not. a case where the contract is expressly prohibited by any statutory or constitutional provision.

Tbe doctrine of ultra vires in tbe law of municipal corporations lias not always been applied by tbe courts in tbe same sense or witb tbe same meaning. Strictly speaking, an act is ultra vires when it is wholly beyond tbe power of tbe municipal corporation under any circumstances to perforin it; in another and less restricted sense, a contract may be ultra vires although the subject-matter is within tbe scope of the powers of tbe corporation if tbe manner in which tbe contract was entered into is prohibited by tbe Constitution or by statute. There seems to be no conflict in tbe authorities on tbe proposition that be who transacts business witb a municipal or public corporation, witb respect to a matter wholly beyond its corporate powers, can have no relief in law or in equity. That is to say, a contract entered into witb a public corporation, concerning a subject-matter wholly beyond its powers, cannot constitute a basis of recovery in an action at law, nor will tbe court; upon any equitable theory, permit a recovery. Such contracts are wholly void because they are prohibited and of this fact all persons dealing witb public corporations must take notice.

In tbe case before us, it must be conceded, laying aside, for tbe moment all technical legal rules, that tbe position taken by tbe plaintiffs presents few, if any, aspects that appeal to tbe conscience of a court of equity. They claim to represent taxpayers who have never complained, though many of them must have bad actual knowledge that tbe respondent Fogel was making valuable improvements that would ultimately be used by Emmons county, and who, after all tbe work has been fully and fairly completed, at an expense of many thousands of dollars to tbe respondent, under contracts fairly and honestly entered into and upon competitive bidding in fact, for the erection of an improvement of public necessity, now come into a court of equity and invoke rules of law to prevent tbe duly constituted officers of tbe county from paying tbe actual and fair value of this public improvement. It is difficult to escape the conclusion that here it was attempted to invoke tbe equitable powers of tbe court to aid in tbe accomplishment of a purpose manifestly inequitable. It would be little less than appalling for a court of equity to be compelled to confess, not only that its arm is powerless to prevent gross injustice, but that at tbe instance of a litigant, it can be made tbe unwilling instrument in tbe actual furtherance of wrong and inequitable conduct.

It is said that equity must follow the law and the chancellor must give full force and effect to the legislative will as expressed in the statutes. This is undoubtedly correct. Statutes governing the method of contracting by public corporations and the rules of law laid down by the courts concerning the interpretation of such statutes, are generally designed for the protection of the interests of the taxpayers and of the public at large. When it happens that such public and private interests have been fully protected, as intended by the statutes and the rules of law, when, notwithstanding a failure to comply with the letter of the law, its spirit and purpose have been fully regarded, can it be said that a court of equity, in preventing the repudiation of a moral obligation due to an individual, though such repudiation be in obedience to the strict letter, but, in fact, in violation of the liberal spirit of the law, "exceeds its powers, abuses its great prerogatives, and substitutes its own arbitrary will for the will and purpose of the legislature? We do not think so. To so hold would be to attribute to the legislative branch of the government a willingness, if not an actual purpose, to be unjust and oppressive, to be unwilling to do equity notwithstanding the protective purposes of the statute have been realized, and to refuse to recognize that an individual who deals with a public corporation, in good faith and within the general scope of its powers, may acquire rights which, in equity and good conscience, should be protected. In short, it would be to ascribe to the legislature a purpose to relieve the state and its political subdivisions from the ordinary obligations of honesty and fair dealing which ought to rest equally upon all persons, ■ natural and artificial, having legal capacity to contract.

Speaking of the vital power of equity to do justice and prevent injustice, the supreme court of Wisconsin said in Harrigan v. Gilchrist, 121 Wis. 127, 235, 99 N. W. 936:

“There is no vitality in precedents: there is in rules. They are susceptible of expansion along every line necessary to reach new conditions. The ingenuity of man in devising new forms of wrong cannot outstrip such development. In all situations and under all circumstances, whether new or old, the principles of equity will point the way to justice where legal remedies are infirm. Precedents will be a constant guide, but never a bar. Where a new condition exists, and legal remedies afforded are inadequate or none are afforded at all, the never-failing ca-pacitj of equity to adapt itself to all situations will be found equal to the case, extending old principles, if necessary, not adopting new ones, for that purpose.”

In a recent case decided by the supreme court of Minnesota, First Nat. Bank v. Goodhue, 120 Minn. 362, 43 L.R.A.(N.S.) 84, 139 N. W. 599, the court had under consideration the question of the right of the plaintiff to recover $2,800 loaned to the village of Goodhue, pursuant to a transaction wholly illegal and void. The court held the village liable and that the plaintiff was entitled to recover. The court say among other things: “The foundation of the rule is found in the fact that the municipality has received money or property for a legitimate municipal purpose for which equity and good conscience require full payment.” In this case the act of the village council was not ultra vires in the strict or primary sense, but the power was not exercised in a legal manner.

This question was again before the supreme court of Minnesota in Fargo Foundry Co. v. Callaway, 148 Minn. 273, 181 N. W. 584. The plaintiff in that case contracted with the defendant village to repair a steel water tank and to install some machinery. The contract was void because not let upon competitive bids as required by the general statutes of Minnesota. The village had the power to contract with reference to the subject-matter, but the power was exercised in a manner contrary to the statutes. The court say:

“The improvement served a municipal purpose and the contract was one that the city had power to make, and, had the essential requirements of the law been complied with, the contract would have been enforceable. In such a situation the village may be compelled to pay the value of what it has received. The express contract disappears from the case. The cause of action arises, not from any contract on the subject, but from the general obligation to do justice which binds all persons, natural and otherwise. The .obligation to pay is measured by the benefit which the village has received.”

Speaking of the moral obligation of the defendant to pay for services rendered, though an action at law might not be maintained on the contract, the Pennsylvania supreme court say:

“A moral obligation, in law, is defined as one Svhich cannot be enforced by action, but which is binding on the party "who incurs it, in conscience and according to natural justice;’ and again, a 'duty which would be enforceable by law, were it not for some positive rule, which, with a view to general benefit, exempts the part}', in that particular instance, from legal liability.’ . . . Councils, it is true, are trustees, and the law limits their expenditure of public money to public purposes, but they are also representatives of their constituents, and delegates of the city’s legislative powers; and there is nothing in the law, or in sound public policy, to prohibit the city from being honest, and paying its bona fide debts, which are good in conscience and justice, though, for sufficient other reasons, there is a general rule which prevents them from being enforceable by law.” Bailey v. Philadelphia, 167 Pa. 569, 46 Am. St. Rep. 691, 31 Atl. 925.
“Equity will not coerce the enforcement of a strict legal right, however clear, if thereby injustice and inequity will be done.” Dorner v. School Dist. 137 Wis. 147, 19 L.R.A.(N.S.) 171, 118 N. W. 353.
“In some jurisdictions the courts have refused to enjoin an act manifestly illegal when it has seemed more inequitable to grant than to refuse an injunction.” Pom. Eq. Jur. § 1776; Brasher v. Miller, 114 Ala. 485, 21 So. 467; Pillager v. Hewett, 98 Minn. 265, 107 N. W. 815.

After reviewing many authorities, the Kansas supreme court says:

“From the authorities we think the following principle may be educed: Where a contract is entered into in good faith between a corporation, public or private, and an individual person, and the contract is void, in whole or in part, because of a want of power on the part of the corporation to malee it, or to enter into it in the manner in which the corporation enters into it, but the contract is not immoral, inequiable, or unjust, and the contract is performed, in whole or in part, by and on the part of one of the parties, and the other party receives benefits by reason of such performance over and above any equivalent rendered. in return, and these benefits are such as one party may lawfully render, and the other party lawfully receive, the party receiving such benefits will be required to do equity towards the other party, by either rescinding the contract, and placing the other party in statu quo, or by accounting to the other party for all benefits received fox which no equivalent has been rendered in return; and all this should be done as nearly in accordance with the terms of the contract as the law and equity will permit.” Brown v. Atchison, 39 Kan. 54, 7 Am. St. Rep. 515, 17 Pac. 474, 475.

In the case of Farmer v. St. Paul, 65 Minn. 176, 33 L.R.A. 199, 67 N. W. 990, the facts were as follows: Farmer was a taxpayer of the city of St. Paul and. brought this suit to enjoin the city from paying the defendant, the House of the Good Shepherd, $71.50 for boarding female prisoners committed by the municipal court of the city and to enjoin the city from allowing any sum in the future for such purpose, and further, to compel an accounting between the city and the House of the Good Shepherd, of all monéy paid to it prior thereto. For many years the city had committed female prisoners to the care of this institution under an ordinance which was wholly invalid, and had paid the institution a very reasonable compensation for such services. The reason for doing this was that the city had no facilities to take care of delinquent female prisoners. The court found the ordinance void, and that the city council had no authority, whatever, to pay the money or to enter into the engagement. The court say among other things:

“Waiving the technical objection that there is no allegation in the complaint that he has requested the city to bring such an action, we are of the opinion that, on the merits, he is not entitled to maintain this action for the purpose of compelling such repayment, for the simple reason that it would be grossly inequitable to permit him to do so. The reason we have suggested why the payment of $71.50 ought not to be enjoined, applies with greater force to past payments.” In refusing to enjoin the payment of $71.50 for services already rendered, the .court said among other things: “While it is true that, upon grounds of sound public policy, the doctrine of ultra vires is applied with greater strictness to municipal than to private corporations, and that in this state a taxpayer may enjoin an unauthorized appropriation of public money, yet in cases where the proposed appropriation is only technically illegal, and it would be more inequitable to grant the injunction than to refuse it, it may be refused. . . . The city has received full consideration for the proposed payment and in equity and good conscience the claim ought to be paid; and the refusal to enjoin its payment, under such circumstances, by the trial court, was a proper exercise of its discretion.”

In the Pillager Case, supra, the court say, referring to the right of the corporation to recover money paid the contractor under a void contract:

“The consideration for such payment was full and fair, and, in equity and good conscience, it ought to have been paid by the plaintiff. Such being the case, it would be most inequitable and unconscionable to compel the defendant to return the money and bonds paid to him under the circumstances found by the trial court, and we hold that the plaintiff cannot maintain this action to recover them.”

The court points out the fact — the distinction has been adverted to heretofore in this opinion — that a case where there is no power in the public corporation to contract, with reference to the subject-matter, is to be distinguished from one where the power exists, but the contract is void because entered into in violation of some statutory provision prescribing the manner in which the power shall be exercised. It seems to bo well settled, therefore, in Minnesota, that equity will not enjoin the payment of the consideration after full performance by the contractor, although the contract with a public corporation was wholly void, wheve the subject-matter is within the general power of the corporation and the contract is not prohibited by statutory or constitutional provision, where there has been no fraud, where full value has been rendered, and where the work was necessary and the benefits have been accepted and are in use by the public. "Within these limitations we think the rule sound in equity and it fully protects the interests of the taxpayers and the general public as intended by the legislature.

Counsel for the appellant cite several North Dakota decisions in which this court has either refused recovery upon contracts of public or municipal corporations entered into in violation of a prohibitory statute or sustained the action of the trial court in enjoining payment under such contracts or the further prosecution of work thereunder. We have examined all of these decisions carefully and we find that no one of them is in point. They are either cases where the county commissioners sought to contract with private individuals for the performance of serwices which the constitution required that certain public officers perform; Storey v. Murphy, 9 N. D. 115, 81 N. W. 23; Fox v. Walley, 13 N. D. 610, 102 N. W. 161; or cases where recovery was asked under, or an injunction sought against the performance of a contract prohibited by statutory or constitutional provision; State ex rel. Diebold Safe & Lock Co. v. Getchell, 3 N. D. 243, 55 N. W. 585; Engstad v. Dinnie, 8 N. D. 1, 76 N. W. 292; Roberts v. Fargo, 10 N. D. 230, 86 N. W. 726; State v. School Dist. 18 N. D. 616, 138 Am. St. Rep. 787, 120 N. W. 555; McKinnon v. Robinson, 24 N. D. 367, 139 N. W. 580; or ivbere the real power to act in the premises was lodged in the voters and the voters had either taken no action or refused to authorize the expenditure; Capital Bank v. School Dist. 1 N. D. 479, 48 N. W. 363; Henderson v. Long Creek Dist. 41 N. D. 640, 171 N. W. 825 ; State ex rel. Diebold Safe & Lock Co. v. Getchell, supra.

It should be noted that in none of the cases cited by the appellant from this court were the equities in favor of the contractor as strong as they are in the case at bar. In the Engstad Case the contractor knew that his contract was of doubtful validity and, in fact, commenced operations for the express purpose of inviting litigation to determine the question. It is true that in the Diebold Safe & Lock Co. Case, supra, the materials had been delivered, but that was a mandamus proceeding and not an action in equity and an express statutory provision required a submission of the question of making the expenditure to the voters of the county, which, however, had not been done. It was a case of complete lack of power in the commissioners to act. The power there was reserved to the electors and for the commissioners to act without action under the statute by the electors was a clear case of usurpation of power and not merely an illegal exercise of power.

Appellants rely strongly on the case of Bayne v. Thorson, 37 N. D. 187, 163 N. W. 822. In that action the plaintiff sued on a contract that was void because the county commissioners had failed entirely to advertise for bids. The court held that there should be no recovery on the contract and the decision is carefully limited to that single point. No attempt was made to recover the reasonable value of the work and materials furnished. Upon principle and authority, no recovery on the contract could be had in that case. .

We think the trial court did not err in refusing to grant an injunction and its decision is affirmed. The respondents to recover the costs of this appeal.

Bronson, Ch. J., and Christianson, Nuessle, and Birdzell, JJ., concur.  