This is a suit on the recovery of one half cent per tie for seven hundred and sixty-three •thousand, one hundred and ninety-three ties alleged to have been sold by plaintiff for defendants as their agent.
The petition was in two counts, the first on a quantum meruit for the value of the services rendered defendants by plaintiff in procuring the sale of the ties, and the second on a contract for the same services. *176The answer to each count was a general denial. The first count was dismissed before submission to a jury. On the second count there was a verdict and judgment for the amount claimed. From that judgment defend- . ants have appealed.
The substantial averment of the second count of the petition is as follows: “That during the years 1891, 1892 and 1893, defendants employed plaintiff as their agent to sell for them railroad ties; that during said time plaintiff sold for defendants 763,193 ties, to the Union Pacific Railway Co.; that defendants agreed to pay to plaintiff a commission for said sale at the rate of one half cent per tie."
It appears from the evidence that the Union Pacific Railway Company used several hundred thousand railroad ties annually. Purchases were made in the fall of the year of a sufficient number to supply its needs through the following year. These purchases were made by means of competitive bidding. The defendants as partners were railroad tie contractors, and in the year 1891 had on hand, for sale, five or sis hundred thousand ties, which they were very anxious to dispose of. They had previously made several unsuccessful efforts to sell to said railroad company. In 1891 plaintiff was, or had been, in the employ of the said railway company as traveling freight agent. He knew all the methods of the railway company in receiving and accepting bids, making contracts forties, and in inspecting them when delivered. He had managed to secure some contracts for other contractors. During the winter of 1891 plaintiff and defendant met, and according to the testimony of plaintiff, entered into an agreement whereby he was employed to undertake to secure for them a contract to furnish the railway company with railroad ties at the letting which would take place in the fall of that year. According to the agreement as detailed by *177him he was to receive as commission one cent per tie if he secured a contract for the sale of one hundred thousand ties and the same, rate for all ties sold in excess of that quantity. The evidence tends to prove that under this agreement plaintiff attended the letting of contracts in the fall of that year and performed some services in determining the proper bid to make, and after making a bid, in securing an acceptance of it. Under this letting defendants obtained a contract for the sale of over one hundred thousand ties. According to plaintiffs testimony, a like contract was made for the years 1892 and 1893, except that it was then agreed that the commission of those and the previous year should be reduced to one half cent per tie. Under these several agreements plaintiff claims to have sold to. said railroad company for defendants, seven hundred and sixty-three thousand, one hundred and ninety-three ties and for which they paid him at different times $658. For the balance of the commission plaintiff prosecutes this suit.
Defendants deny the employment of plaintiff, but testify that he merely volunteered his services to put in such bids as they might conclude to make and that was substantially all that he had done, and that the payments made to him were gratuitous. The evidence was not conclusive that during the time those sales were made, plaintiff was in the employ of the railroad company, but tends to prove that fact.
At the trial plaintiff testified to facts, in respect to the services rendered, from which the inference could be drawn that in order to enable him to underbid other contractors, he had, by the corruption and bribery of the employees of the railway company, obtained knowledge of all other bids before those of - defendants were deposited. Indeed the testimony of plaintiff, and letters written by him to defendants during the time of the alleged employment, establish very conclusively *178that such corrupt methods were employed with the knowledge and approval of defendants, and all the evidence taken together, tends to prove that in the erm ployment of plaintiff, both he and defendants had in view the use of such means, and that obtaining such information in that manner was the principal consideration of the employment. At the conclusion of the evidence, on request of plaintiff the court instructed the jury, in effect, that if plaintiff was employed by defendants to sell ties to the railway company, and in pursuance of such employment he did sell to it the ties in question, then plaintiff is entitled to recover.
Defendants asked, and the court refused to give, an instruction in the nature of a demurrer to 'the evidence. The court then instructed the jury, 'at the request of defendants, to the effect that, though plaintiff rendered to defendants valuable services in getting contracts with the railway company, yet he is not entitled to recover the value of such services unless he had a contract with defendants therefor, as charged in the first count in the petition. Instructions 7, 8 and 10 asked by defendants, and refused by the court, are as follows:
“7. Although the jury may believe from the evidence that the plaintiff was employed by defendants to sell ties for them to the Union Pacific Railway Company, and was to receive a commission for his services, yet if the jury further believe from the evidence that the ties mentioned in plaintiff’s petition were sold and delivered to said company, under and in pursuance of bids made by defendants and contracts awarded defendants upon such bids so made, then plaintiff is not entitled to recover.
“8. Although you may believe from the evidence that the plaintiff was employed by defendants to look after and attend to their interests in and about obtain*179ing contracts to furnish ties to the Union Pacific Railway Co., and that-plaintiff obtained information from employees of said company in the office of the purchasing agent of said company as to bids then in, which enabled defendants to underbid others, and that defendants were thereby enabled to and did obtain contracts, yet if you shall believe from the evidence that under said contracts the ties mentioned in plaintiff’s petition were furnished to said company, and not under a sale made by plaintiff to said company, your verdict will be for defendants.
“10. This suit was brought to recover commissions which plaintiff claims are due him for ties sold to the Union Pacific Railway Co. by him as the defendants’ agent, and not for services rendered for obtaining information of any kind, nor for any services rendered on any other account whatever.”
Other instructions to the same effect were asked by defendants, and refused by the court.
I. It is insisted in the first place that the allegations of the petition are not sustained by the evidence. In other words, that the charges that plaintiff was employed to sell and did sell ties to the Union Pacific Railway Company, were not sustained by proof that the ties were sold to said company under and in pursuance of bids by defendants, and contracts awarded them upon the bids so made. It was well known to both plaintiff and defendants, when the agreement was made, that the contracts for the purchase of ties would be let on competitive bidding. By this means sales by one party, and purchases by the other, were made. This method of purchasing, it is true, did away with the usual negotiations as to the prices to be paid, but when concluded, by acceptance of the bids and entering into contracts, the transaction was none the less a sale because the offers to sell were made in the form of bids *180■which the proposed seller might not change. The evidence shows also that the bids did not necessarily conclude the sale. Indeed it appears that contracts were not always awarded to the lowest bidder. The quality of the ties, the responsibility of the bidder and his business character, as well as the sufficiency of the bond which was required, were taken into consideration in accepting offers. But even had contracts been awarded unconditionally to the lowest bidder, and sales by that means alone affected, no reason can be seen why defendants could not have committed this service to an agent or employee, and agreed upon the compensation to be. paid therefor.
Nor do we think that there is substantial merit in the contention that an agent could not be the procuring cause of a sale for the reason that the purchaser was .known beforehand. An agency of this character is not analogous to that of one employed generally to sell real estate, or other property, in which the chief duty is to find a purchaser ready, willing and able to buy on the terms named by the principal. Defendants had the right to accomplish through an agent any service they might themselves lawfully perform.
To entitle an agent employed to sell property for his principal to compensation for his services it is not essential that the sale should have been accomplished through his unaided efforts. If he perform such duties about making the sale as is expected of him, under the terms of the agreement, and a sale is thereby effected, he is entitled to, and may demand the agreed compensation for his services. It has been held that one employed to sell real estate for another, has performed his duty so as to entitle him to his commission when he finds a purchaser ready, willing and able to buy, though the negotiations are completed by the principal *181in person. Gelatt v. Ridge, 117 Mo. 560, and cases cited.
The refused instructions are predicated upon the theory that the letting of contracts under competitive bidding are not sales as charged in the petition. The instructions were properly refused.
II. Defendants insist, in the nest place, that the employment under which plaintiff undertook to sell the ties, contemplated bribery and corruption of the employees of the railroad company, and is therefore contrary to good morals and public policy, and cannot be enforced. The contract, as stated in the petition, is free of any taint of immorality. The allegation is, in substance, that plaintiff was employed by defendants to sell railroad ties to the Union Pacific Railway Company at an agreed commission. The answer to this is a general denial. The testimony of plaintiff, which must be taken as an admission, and the unexplained letters written by him to defendants, show very conclusively that plaintiff, in performing his contract, secured information of the bids other contractors had made, by means of which he was enabled to underbid them, and that this information was obtained by corrupting the employees of the railway company. The evidence also tends to prove, though not conclusively, that the use of these immoral and corrupt methods were contemplated when plaintiff was employed, and was the chief consideration therefor.
If such was the real agreement of the parties, it would be one that no court, either of law or equity, would enforce. The principle is well settled that “no court will lend its aid to a man who founds his cause of action upon an immoral or illegal act.” This is a principle founded upon public policy “not for the sake of the defendant, but for the law’s sake, and that *182only.” Attaway v. National Bank, 93 Mo. 485; Sprague v. Rooney, 104 Mo. 360; Atlee v. Fink, 75 Mo. 102.
The question then is, whether this defense is available under a general denial. It is held in Sprague v. Rooney, supra, that the effect of a general denial is to deny the legality of the contract sought to be enforced, and under it evidence is admissible to prove that the real contract, which on its face is valid, is in fact intended to accomplish an immoral and illegal object. The rule declared in the Sprague case, supra, seems to be in conflict with the weight of authority in this State, and a contrary doctrine was expressly declared by the same judge in the subsequent case of St. L. A. & M. Ass’n v. Delano, 108 Mo. 220. The learned judge there says: “There is nothing on the face of the petition herein which indicates any other than a valid contract between the plaintiff and defendants; and when this is the case, the rule is that if the contract is to be invalidated by reason of some extrinsic matter, such matter must be pleaded in order that it may be made issuable at the trial, so that it may be considered on appeal.” The following cases cited fully sustain what is said: Sybert v. Jones, 19 Mo. 86; Moore v. Ringo, 82 Mo. 468; Musser v. Adler, 86 Mo. 445.
In the case last cited Judge Black says: “This defense” [that services rendered were contrary to public policy], “so far as pleading is concerned, is not unlike that of champerty, gaming, usury, and the like. It is an affirmative defense, and should be clearly and distinctly stated.” That a denial does put in issue the validity of the contract “sued upon” is undoubtedly true. That is when the contract is offered in evidence in support of the allegations of the petition and its illegality appears upon its face relief should be denied, whatever the condition of the pleadings. The same is true where the plaintiff can only make out his case *183through the medium of an illegal transaction to which he himself is a party. Hence the common statement of the courts that, “if it appear from plaintiff’s own showing that the contract arises from an immoral cause, or the transgression of a positive law, the court will at once refuse its assistance.”
But when the illegality does not appear from the contract itself or from the evidence necessary to prove it, but depends upon extraneous facts, the defense is new matter, and must be pleaded in order to be available.
As has been said, the contract here sued upon, as stated in the petition, is one the parties had the right to make, without infringing any rule of public policy, and plaintiff was not required, in order to make out his case, to prove the illegal methods resorted to in order-to effect a sale of the ties. The admissions of plaintiff to the bribery and corruption of the employees of the railroad company in carrying out the agency, would be competent, as evidence tending to prove the immorality of the real intention of the parties, but would not be so conclusive of the immorality of the real contract, as to require the court to refuse relief.
“The fact that unlawful means were used in performing an agreement which is prima facie lawful and capable of being lawfully performed does not of itself make the agreement unlawful. This or other subsequent conduct of the parties in the matter of the agreement may be evidence, but evidence only, that a violation of law was part of the original intention, and whether it was so is a pure question of fact.” Pollock on Contracts, 329; Sawyer et al. v. Taggart, 77 Ky. 734; Armstrong v. Bank, 133 U.S. 469.
Whether the contract here sued upon was against the policy, of the law was, therefore, a question of fact, which should have been put in issue by the pleadings and determined by the jury. No issue was made on *184the question, nor was the court even requested to instruct the jury upon it.- It is evident that the defense was not made on the theory that the contract was illegal.
The judgment is affirmed.
Brace and Robinson, JJ., concur; Barclay, J., concurs in the result.