The opinion of the court was delivered by
Porter, J.:The conclusions we have reached in this case render it necessary to consider only the question whether the demurrers to the second and third counts of the answer should have been sustained. It is proper to say here that there is a substantial conflict in the averments of the answer and the claims advanced by counsel for plaintiffs in error in their briefs, which makes it somewhat difficult to understand what their position is. It is asserted in the briefs that “the answer pleaded that the plaintiff actively promoted the work, and by its manipulation had the city order and advertise that the work should be done with a certain kind of brick only furnished by the plaintiff.” Again they say:
“The allegations contained in the answer of the National Surety Company charge that the improvements were promoted by the plaintiff below, for the purpose of having the city, in ordering- it to be done, expressly, to direct in the ordinance and the contract thereunder that the improvements should be constructed out of the brick exclusively manufactured and sold by it; that both said ordinances and contracts did so provide; that plaintiff did sell all the brick that were used in the construction of the improvements.”
In the reply-brief particular attention is again called to the answer, and it is persistently urged that it contains these averments. A careful reading of the answer will disclose, we think, that this claim is- incor*202rect. No such statements, are found there, in substance or in form. The .answer alleges that all the illegal acts complained of were procured to be done by the Diamond Brick and Tile Company, but nothing connecting that company with plaintiff is alleged, save' and except the following: “If plaintiff sold any of the material described in its petition to the defendant W. W. Atkin, and delivered the same for the work described in the contract mentioned in plaintiff’s petition, such sale and delivery were made with, full knowledge of the'facts hereinbefore set forth.” If the plaintiff had been the Diamond Brick and Tile Company, or if the answer had alleged what the briefs say it did, it is apparent that a different question would be presented.
If it be conceded that the facts set forth in the answer established the illegality of the contract entered into by Atkin for the paving of these streets, then the further question arises, Is plaintiff, who is not alleged to have participated in the fraud or illegality, prevented from recovering for material furnished under a separate contract with Atkin, for the reason that the sale of the material was made “with full knowledge- of the facts” which made it illegal? It will require no extended argument, we think, to demonstrate that the facts set forth in the second count of the answer, which are admitted by the demurrer, render the contract entered into for paving these streets illegal and void. Section 747 of the General Statutes of 1901 provides:
“Before the buildihg of any bridge or sidewalk, or any work on any street, or any other kind of work or improvement, shall be commenced by the city council, or under their authority, a detailed estimate of the cost thereof shall be made under oath by the city engineer and submitted to the council; and in all cases where the estimated cost of the contemplated work or improvement amounts to one hundred dollars, sealed proposals for the doing or making thereof shall be invited by advertisement, published by the city clerk in the official newspaper of the city for at least three consecutive days, and the mayor and council shall let the work by con*203tract to the lowest responsible bidder, if there be any such whose bid does not exceed the estimate.”
The object and purpose of this provision of the statute is to insure competition in the letting of contracts for public improvements. This is the uniform ruling of courts in reference to similar statutory and charter provisions governing cities. (Schoenberg v. Field, 95 Mo. App. 241, 68 S. W. 945; Smith v. Syracuse Improvement Company, 161 N. Y. 484, 55 N. E. 1077; Swift v. City of St. Louis, 180 Mo. 80, 79 S. W. 172; Larned v. City of Syracuse, 17 N. Y. Supr. Ct., App. Div., 19, 44 N. Y. Supp. 857; Galbreath v. Newton, 30 Mo. App. 380; McQuiddy v. Brannock, 70 Mo. App. 535.)
The answer alleges that several other kinds of vitrified brick were made and sold in Kansas City, equal in all respects to the particular brand named in the contract. The principal item of cost in the material used for this paving was the brick. If but one particular brand' or make of brick was to be used, in the very nature of things all opportunity for competition was eliminated, and favoritism, fraud and corruption were made possible, and extremely probable. Indeed, fraud and favoritism were so apparently the purpose of this provision of the contract and ordinance that the court should not hesitate to condemn as illegal and void all the proceedings. It is urged, on the other hand, that section 730 of the General Statutes of 1901 provides that “in case of paving, such petition shall state the width of the paving, and a specific description of the material to be used.” This provision must be construed with the other provision, which was obviously intended to insure competition. To give to section 730 the construction urged would defeat the purpose of the other section. We give effect to both by holding that section 730 is complied with by describing in the petition the material used without designating a kind manufactured or furnished by but one person or company. In a petition for paving the use of the words *204“vitrified brick” of standard or some designated quality, without the mention of any particular make or brand, would certainly answer all the requirements of this section and still leave opportunity for competition. The tendency of the courts has been to hold all the proceedings void where opportunity for open competition is denied. In the case of Smith v. Syracuse Improvement Company, 161 N. Y. 484, 55 N. E. 1077, it was said:
“A petition for the pavement of a street in the city of Syracuse ‘with vitrified paving brick, manufactured by the New York Brick and Paving Company, of Syracuse, N. Y.,’ and all the proceedings had thereon by the common council, are in violation of the provisions of the city Charter requiring the work to be let to the lowest bidder, and are void, when it appears that the company referred to has a complete monopoly upon the disposal of such brick, and that there are other persons or corporations who manufacture and sell vitrified brick for paving purposes, equal in quality to the particular kind specified.” (Syllabus.)
The court held that the petition was void because “through it the petitioners prayed the common council to take such action as was condemned by statute, and, therefore, the petition was void ab initio.” (Page 491.) In the case of Schoenberg v. Field, 95 Mo. App. 241, 68 S. W. 945, which is directly in point, the court said:
“The question thus presented is this: Had the board of public works the power under the charter to arbitrarily select a paving material that was manufactured by one company to the exclusion of the same material manufactured by other companies? The case shows that vitrified brick, as manufactured by the Diamond Brick and Tile Company, was not a patented article and was not thus a monopoly by reason of being pat-tented. On the contrary, several other companies, in and near Kansas City, manufactured such brick for paving which had passed the standard tests for street paving. The general policy in Kansas City is that in letting public work opportunity must be given for competition. The very fact that the work is let on public *205notice at public bidding discloses this. . . . What possible opportunity can there be for competition when there can be but one bidder? What possible benefit can result to the property-holder for a public letting of the contract when the contractor has-already been selected? The board of public works had the right to designate and select vitrified brick as the paving material, but it had no right to stifle competition and thereby violate the provisions of the city charter by cutting out, in advance, all competitors.” (Pages 247, 248.)
We quote also from the opinion of the court in Larned v. City of Syracuse, 17 N. Y. Supr. Ct., App. Div., 19, 44 N. Y. Supp. 857, a case exactly in point:
“If all men were honest there would be need of few laws, but the experience of all cities shows that fraud sometimes enters into municipal contracts, and the object of the statute under consideration is to prevent favoritism, which is one of the most insidious and dangerous kinds of fraud. ... If competition in brick can be thus restricted, the same rule can be applied to lime, labor and whatever enters into the cost of constructing a pavement. Bids might call for brick manufactured by A., lime made by B., broken stone furnished by C., and labor performed by D., all,- however, at prices named, and thus favoritism be allowed to permeate the entire contract. • Argument is hardly needed to show that this is not competition or a letting to the lowest bidder in the sense meant by the statute. The object of the statute is to keep prices down to reasonable rates, and when this is taken into account it is clear that it was the intention of the legislature that bidders should be unhampered by any restriction whatever, except the specifications regulating the amount and quality of the labor and materials; that bidders should be allowed to buy where, they can buy -cheapest, so that they can bid lower than if compelled to buy of one company, and that competition should •extend to one part of the contract as much as another.” (Pages 26, 27.)
In the case at bar the answer set up facts with reference to the contract which, if true, rendered it absolutely void because it was against the provisions of *206the statute, and in contravention of sound public policy.
Conceding the illegality of the contract between Atkin and the city, there remains the question whether the answer contains averments which sufficiently connect plaintiff with the illegality to prevent it from recovering for the material furnished. Some contracts are so inherently vicious and immoral that no action can be maintained to enforce them; and courts will not permit a recovery upon a collateral contract which is so connected with the former that the illegal or immoral purpose is kept in view. Where goods are sold or premises leased for the express. purpose of being used for an immoral and unlawful purpose the agreement is void, and there can be no recovery of the price. (9 Cyc. 573.) A case in point is Standard Furniture Co. v. Van Alstine, 22 Wash. 670, 62 Pac. 145, 51 L. R. A. 889, 79 Am. St. Rep. 960, where a vendor sold goods with the knowledge that they were to be used in a house of ill fame, reserving title with the right to take possession, and was denied the right to recover.
The contract to pave in this case was not illegal or immoral upon its face, but the answer pleaded facts which, if true, rendered it contrary to public policy and void. In the case of De Wit v. Lander, 72 Wis. 120, 39 N. W. 349, plaintiff sued upon a contract which it appears from the evidence involved a partnership with another to engage in the business of a night scavenger, which the ordinances of the city prohibited a person from exercising without a license. It was held he could not recover.
“It is a general rule that contracts are void which are repugnant to justice, or founded upon an immoral consideration, or which are against the general policy of the common law, or contrary to the provisions of any statute (even where such statute doe§ not expressly declare them void) ; and that a party who is obliged to trace through such a contract his right to a debt alleged to be due him cannot recover.” (Melchoir v. McCarty, 31.Wis. 252, 11 Am. Rep. 605.)
*207The rule is stated by Kent as follows: “If the contract grows immediately out of, or is connected with, an illegal or immoral act, a court of justice will not enforce it. But if it be unconnected with the illegal act, and founded on a new consideration, it may be enforced.” (2 Kent’s Com., 14th ed„ *466.) And in the case of Buck v. Albee, 26 Vt. 184, 190, 62 Am. Dec. 564, it was said:
“In the application of this rule it may be observed that in all cases where it is necessary to prove the illegal contract and sale to enable the plaintiff to recover, then the contract is so connected with the illegal act that a recovery cannot be had. But if the right can be established without such proof, the plaintiff may recover; for the claim is' unconnected with the sale, and rests on a new consideration.”
When the party complaining can establish his claim without relying upon the illegal transaction, it is the general holding of the courts that he can recover; but, if it requires the aid of the illegal contract or transaction, he cannot. The cases are collated in volume 9 of the Cyclopedia of Law and Procedure, pages 546 and 556.
The petition of plaintiff in this case is based upon the surety bond. The statute requiring the giving of the bond sued on reads,as follows:
“That whenever any public officer shall under the laws of the state enter into contract in any sum exceeding one hundred dollars, with any person or persons, for purpose of making any public improvements, or constructing any public building, or making repairs on the same, such officer shall take from the party contracted with a bond with good and sufficient sureties to the state of Kansas, in a sum not less than the sum total in the contract, conditioned that such contractor or contractors shall pay all indebtedness incurred for labor or material furnished in the construction of said public building' or in making said public improvements.” (Gen. Stat. 1901, § 5130.)
Plaintiff’s petition recites, first, the making of the contract, and refers to the same, with the plans and *208specifications on file in the office of the city clerk; next, the execution of the surety bond, the furnishing and use of the material, and non-payment by Atkin. In the opening statement of plaintiff’s counsel the contract for paving is referred to as the first step in the proof, and the contract itself, with the plans and specifications, was introduced in evidence as a basis for the execution of the bond sued on. Thus it is apparent that in order to maintain the action plaintiff found it necessary to allege and prove the contract, which from the facts set forth in the answer was illegal and void. As was said in Thomson v. Thomson, 7 Ves. Jr. 470, 473, “here you cannot stir a step but through that illegal agreement; and it is impossible for the court to enforce it.” (See, also, Gunter v. Leckey, 30 Ala. 591.)
It is urged that the statute requiring the giving of a bond was enacted for the express protection. of laborers and material-men; and that, therefore, plaintiff is within its protection, and, not being a party to the illegal contract entered into by Atkin and the city, the facts set forth in the answer constitute no defense. It is a well-recognized rule that where the statute, the violation of which makes the contract illegal, is enacted for the protection of one of the parties to the transaction, he can recover notwithstanding he must prove the illegal contract. Thus, where statutes against usury make the contract illegal, the party injured may maintain an action to recover the excess, for the reason that the statute was designed to protect the needy borrower, and to deny him the right of action would defeat the purpose of the law. The penalty is imposed upon but one of the parties, and the law does not consider them in pari delicto. (9 Cyc. 553.) The statute requiring competition in the letting of contracts for public improvements is what renders the contract here illegal; and the intention was to protect the taxpayer and the public — not material-men and laborers. The exception noted to the *209general rule does not reach so far as counsel contend, nor does it afford protection to plaintiff.
The statute upon which plaintiff relies and which authorizes the execution of the bond contemplates that, first, a valid contract shall be made — a contract let by competitive bids; competition is a condition precedent to the letting of a valid and binding contract. With full knowledge of the facts plaintiff cannot maintain an action upon the bond, because in order to do so it is necessary to prove the contract for the improvement; and when it appears by the facts averred in the answer that the contract was illegal and void, and that plaintiff had full knowledge of those facts, its contract is likewise shown to be tainted, and falls with the other. In Woolfolk v. Duncan, 80 Mo. App. 421, 427, it was said:
“It is well settled that no action will lie upon any contract based upon any unlawful consideration, or which is repugnant to law or sound policy or good morals — ex turpi contractu actio non oritur. And it is equally well settled that if a contract grows immediately out of or is connected with an illegal or immoral act a court of justice will not enforce it. And if the contract in fact be only connected with the illegal or immoral transaction and growing out of it, though it be in fact a new contract, it is equally tainted. . . . There is no distinction between a contract that is immoral in nature and tendency and therefore void as against public policy and one that is illegal and prohibited by law.” (See, also, Ernst v. Crosby, 140 N. Y. 364, 35 N. E. 603; Kansas City v. O’Connor et al., 82 Mo. App. 655; Town of Kirkwood v. Meramec Highlands Co., 94 Mo. App. 637, 68 S. W. 761.)
Sound policy, we think, requires us to hold that a contract of the character of the one in question, which is void for the reason that it opens the door to fraud and favoritism and to the defrauding of taxpayers and. the public, shall not be used as the basis of recovery in an action by a party who acquired his rights with full knowledge of the facts which rendered the contract and the proceedings void. The facts averred *210in the second count of the answer therefore constituted a defense to the action, and the demurrer should have been overruled.
The third count of the answer states no defense, and the demurrer was rightfully sustained. (Risse v. Planingmill Co., 55 Kan. 518, 40 Pac. 904.)
We find nothing substantial in the other errors assigned, but the case is reversed and remanded, with instructions to overrule the demurrer to the second count of the answer.
All the Justices concurring.