Ryan, C.
This action was brought by the plaintiff in error, a partnership firm engaged in the manufacture of beer, to.recover of defendant the sum of $707.06, the price of certain beer alleged to have been furnished by plaintiff to defendant in the month of June, 1889. By way of counter-claim the defendant alleged that the beer was furnished him by plaintiff under a written agreement which required that the plaintiff should furnish the license necessary under the laws of Nebraska; .that plaintiff had neglected to provide this license, and that in consequence of such neglect the defendant had been required to pay the sum of $1,000 for such license. By reply the plaintiff averred that if the defendant had taken out a license it was to enable him to sell vinous and spirituous liquors and not to enable him to perform his contract with the plaintiff. There was also in the reply this language: “The plaintiff further alleges that there is and has been since long before September 1, 1888 [the date of a written contract between plaintiff and defendant], a usage and custom existing and prevailing among brewing companies generally, and particularly in the state of *579Nebraska, and in the city of Omaha, for each of said brewing companies to operate, in connection with its brewery, a bottling department for the purpose of bottling beer of its own manufacture exclusively; that under said usage and custom said bottling department had been conducted under the liquor license issued to the brewery and through an agentwho receives beer from the brewery at a fixed price, and who operates the bottling department,,as a part of, and in the interest of, the said brewery; that the contract referred to in the defendant’s answer was entered into by the plaintiff and the said defendant with knowledge of, and with reference to, said usage and custom, and that said usage and custom thereby became and is a part of said contract.f Upon the trial defendant admitted that he owed plaintiíf the amount claimed, and a verdict was accordingly returned. Thereupon defendant moved for a dismissal of the plaintiff’s action and for a judgment for costs for the reason that “the-pleadings upon their face show that the sales for which plaintiff sought to recover were made in pursuance of an unlawful contract between the plaintiff and the defendant, and for the further reason that the contract under which the sales were made, contemplated the resale of said beer by the defendant with the intent and for the purpose, on the part of the said plaintiff, of enabling the defendant to resell contrary to law.” This motion was sustained and judgment was accordingly rendered against the plaintiff for costs.
From the fact that the plaintiff brought suit for the price-of the beer agreed upon between himself and the defendant, it is clear that the defendant was not a mere agent for the sale of the plaintiff’s beer. The petition was framed upon the theory that plaintiff had sold the defendant the-beer for which suit was brought, though the use of the-word “sale,” or any equivalent term, was avoided. It is equally clear that as a retail vendor of liquor the defendant was by section 25, chapter 50, Compiled Statutes, required *580to pay a license of $1,000, his place of business being, as it was, in the city of Omaha. By the reply there was alleged a custom with reference-to which the parties litigant had contracted whereby the obligation to pay the required license was avoided, which arrangement was clearly in violation of the statute above referred to. The plaintiff, however, insists that since the defendant had admitted that he had obtained the beer from plaintiff and was owing that amount, judgment should have been accordingly rendered. This admission did not amount to a confession of judgment, neither did the verdict thereon returned, restricted as the jury was by the instruction of the court that the counterclaim was not by them, to be considered. The question whether or not a recovery should be had by one of the two parties to a contract for the violation of a statute still remained open for determination by the court upon the pleadings. Whether or not this question was correctly decided by the court is the only one with which we are concerned.
The plaintiff has cited only one adjudged case which is directly in point, and as the principle upon which that case proceeds must be far-reaching in its effects, the extent of its recognition, as well as its soundness, will now be considered at some length. The case referred to is Manchester & L. R. Co. v. Concord R. Co., 20 Atl. Rep. [N. H.], 383, in which there is quoted with approval the following language found in 2 Morawetz, Private Corporations, section 721: “If an agreement is legally void and unenforceable by reason of some statutory or common law prohibition, either party to the agreement who has received anything from the other party, and has failed to perform the agreement on his part, must account to the latter for what has been so received. Under these circumstances, the •courts will grant relief irrespective of the invalid agreement, unless it involves some positive immorality or there are other reasons of public policy why the courts should refuse to grant any relief in the case. * * * These *581doctrines have been applied repeatedly in suits arising out of contracts entered into by corporations, although prohibited by statute or by the common law; and, although the contracts are held illegal and unenforceable in these cases, a recovery was allowed to the extent of the consideration received.” A review of the authorities cited in support of these propositions does not tend to establish the doctrine announced.
It was held in White v. Franklin Bank, 22 Pick. [Mass.], 181, that a suit could be maintained upon an entry in a deposit book made by defendant’s cashier by which, in effect, the bank became bound to pay at a future time the amount of plaintiff’s deposit, because the statute of Massachusetts prohibited banks from assuming such liability. In the opinion we find the following language: “The second objection, and that on which the defendant’s counsel principally rely, proceeds on the admission that the contract is illegal; and they insist that where money has- been paid by one of two parties to the other on an illegal contract, both being participes criminis, no action can be maintained to recover it back. The rule of law is laid down by Lord Kenyon in Howson v. Hancock, 8 T. R. [Eng.], 577, and in other cases. This rule may be correctly stated in respect to contracts involving any moral turpitude, but when the contract is merely malum prohibitum, the rule must be taken with some qualifications and exceptions, without which it cannot be reconciled with many decided cases. The rule as stated by Comyn, in his treatise on Contracts, will reconcile most of the cases which are apparently conflicting. When money has been paid upon an illegal contract, it is a general rule, that if the contract be executed, and both parties are in pari delicto, neither of them can recover from the other the money so paid ; but if the contract continues executory, and the party paying the money be desirous of rescinding it, he may do so, and recover back his deposit by action of indebitatus assumpsit *582for money had and received. And this distinction is taken in the books, namely, where the action is in affirmance of an illegal contract, the object of which is to enforce the performance of an engagement prohibited by law, clearly such an action cau in no case be maintained; but where the action proceeds in disaffirmance of such a contract, and instead of endeavoring to enforce it, presumes it to be void and seeks to prevent the defendant from retaining the benefit which he derived from an unlawful act, there it is consonant to the spirit and policy of the law that the plaintiff should recover. (2 Comyn, Law of Contracts, 109.)” The inhibition of the statute was with reference to the incurring by the bank of an indebtedness payable at a future day certain. The entry in the deposit book was as follows: "Dr. Franklin Bank, in account with B. F. White, Cr. 1837, Feb. 10th. To cash deposited, $2,000. The above deposit to remain until the 10th day of August. E. F. Bunnell, Cashier.” This entry was held to be within the inhibition of the statute. The party forbidden was the one which violated the provisions of the statute; the depositor was by no means in pari delicto, therefore he was held entitled to recover the amount of his deposit. This distinction in principle was recognized in Sackett’s Harbor Bank v. Codd, 18 N. Y., 240, and the liability of the defendant was accordingly adjudged to exist.
The action in Bill v. Inhabitants of Wareham, 7 Met. [Mass.], 438, was to recover back the sum of $500 paid by the plaintiff to the town of Wareham for the privilege of taking oysters within its limits. The power of the town to grant the privilege was denied by the statute, and, upon the refusal of the town to allow the privilege paid for, the suit was brought as indicated. Chief Justice Shaw, in delivering the opinion of the court, said: “ In regard to the sum of five hundred dollars, as it appears that was received by the treasurer and went to the use of the town, and was so received in advance, upon a consideration which has *583failed, it must be regarded as money had and received by the town to plaintiff’s use; and therefore the action for that sum will lie.”
In Episcopal Charitable Society v. Episcopal Church in Dedham, 1 Pick. [Mass.], 371, a note had been given by the rector and wardens of the church upon request of the -church society, which money had been not only borrowed for, but had been used by, the church society, and it was held that such society was bound to pay the amount so borrowed, even though there existed no direct legal authority in the rector and wardens to bind the church. As will be seen by the title of this case it was an action by the lender of the money to recover the amount loaned, hence the principle laid down by Mr. Morawetz, even if abstractly correct, was not applicable as it might have been if the rector and wardens after having paid the note had sued the church society to recover the amount so paid.
The syllabus in Whitney v. Peay, 24 Ark., 22, begins with the statement: “The state issued bonds for the use •of the Real Estate Bank, the bonds being prohibited by law from being sold for less than the par value thereof; ” but this proposition cuts no special figure in the case, for these bonds having been pledged as security for a loan, the sole questions determined were as to the rights' and liabilities of the original pledgee and his assignee of the pledge and of the assignee of such assignee among themselves as to the respective loans on the property pledged. The court held that the bonds must be returned to the original pledgor upon payment of the amount to secure which originally such pledge was made, notwithstanding the fact that by subsequent pledges of the bonds a loan of a larger sum had been effected.
The recovery of judgment in Philadelphia Loan Co. v. Towner, 13 Conn., 248, was for an amount loaned in Pennsylvania. It was held in this case that the laws of Pennsylvania should govern, and that as the charter of plaintiff *584had provided that “nothing therein contained should be construed to authorize the company to discount notes," and the loan of money upon which the interest was reserved in advance constituted a discount, therefore no recovery could be had upon the note. The right of the loan company to recover judgment upon another theory which was recognized by the supreme court of errors of Connecticut is thus fairly stated in one paragraph of the syllabus: “Where a ^corporation, having power to sue and be sued and to loan money under certain restrictions, made a loan, and afterwards took a note as security in contravention of the provisions of its charter, it was held, in a suit on such note with the money counts, that although there could be no recovery on the note, the money loaned, with the legal interest, might be recovered on the money counts." This principle was the only one involved in Vanatta v. State Bank of Ohio, 9 O. St., 27.
In Foulke v. San Diego & G. S. P. R. Co., 51 Cal., 365, the opinion was very brief and was correctly summarized in this language of the syllabus: “The provision in the act concerning railroad corporations that 'no contract shall be binding on the company unless made in writing/ refers only to contracts wholly executory; but the action against the corporation on such verbal executory contracts must be brought upon an implied promise and the recovery must be limited to the value of the benefit received by the corporation." The lease of a certain part of a line of railroad was not authorized by the stockholders of the company by which said line was owned, as required by statute, and said lease was therefore held void. Inasmuch as the transaction was not tainted with any immorality, a recovery of just compensation for the use of the road was allowed without reference to the unauthorized lease. (Farmers Loan & Trust Co. v. St. Joseph & D. C. R. Co., 1 McCrary [U. S.], 247.)
In' Madison Avenue Baptist Church v. Baptist Church. *585in Oliver Street, 73 N. Y., 82, there had been an attempted union of the two church societies under an agreement that one should be merged in the other, which should be bound for and pay the debts of both. This was ultra vires, but while the arrangement existed, and was supposed by all parties to be binding, debts were paid by the church supposed to be the sole survivor, for the church supposed to have been merged in it. The court of appeals held that for money so paid, the church whose debt had been thus paid was liable.
In Tracy v. Talmage, 14 N. Y., 162, it was held that, although the vendor was a party to the illegal contract, he was not in pari delicto within the rule which forbids the court to grant one party to an illegal contract or transaction relief against the other, and that where parties to a contract or transaction not malum in se, but prohibited by a statute, are not equally guilty, courts may afford relief to the less guilty party.
In United States Express Co. v. Lucas, 36 Ind., 361, it was held that an agent who had received money for which the company was liable could not as a defense to an action of the company, his principal, set up that his said principal had failed to file in the proper recorder’s office a statement of the capital employed in its business, as required by statute.
From this review of the principal authorities cited to sustain the rules quoted from 2 Morawetz, Private Corporations, section 721, it is shown to be extremely probable that no court, except such perhaps as may have been misled by his statements, has ever enforced the aforesaid principle laid down by Mr. Morawetz, that “ If an agreement is legally void and unenforceable by reason of some statutory or common law prohibition, either party to the agreement who has received anything from the other party must account to the latter for what has been so received.” Equally without judicial sanction is his next proposition, that *586“Under these circumstances, the courts will grant relief irrespective of the invalid agreement, unless it involves some positive immorality, or there are other reasons of public policy why the courts should refuse to grant any relief in the case.” The correct rule was quoted from the language of Lord Mansfield in Holman v. Johnson, 1 Cowper [Eng.], 343, by Eyre, C. J., in Lightfoot v. Tenant, 1 Bos. & P. [Eng.], 551. This language is as follows: “ The objection that a contract is immoral or illegal sounds at all times very ill in the mouth of a defendant. It is not for his sake, however, that the objection is ever allowed, but it is founded iu general principles of policy which the defendant has the advantage of, contrary to the real justice as between him and the plaintiff, by accident, if I may so say. The principle of public policy is this, ex dolo malo, non oritur actio. — No court will lend its aid to a man who founds his cause of action upon an immoral or an illegal act. If from the plaintiff’s own stating, or otherwise, the cause of action appears to arise ex turpi causa, or the transgression of a positive law of this country, there the court says he has no right to be assisted.” After this introduction Lord Mansfield stated the question to be, “whether the plaintiff’s demand is founded, upon the ground of any immoral act or contract, or upon the ground of his being guilty of anything which is prohibited by a positive law of this country.” These clearly stated principles were recognized and enforced in Spurgeon v._ McElwain, 6 O., 442; Banchor v. Mansel, 47 Me., 58; Hubbell v. Flint, 13 Gray [Mass.], 277; Hull v. Ruggles, 56 N. Y., 424; Skiff v. Johnson, 57 N. H., 475; Aiken v. Blaisdell, 41 Vt., 655; Foster v. Thurston, 11 Cush. [Mass.], 322; Hooker v. De Palos, 28 O. St., 251; Ruckman v. Bryan, 3 Den. [N. Y.], 340; McKinnell v. Robinson, 3 M. & W. [Eng.], 434; Mosher v. Griffin, 51 Ill., 184; Raymond v. Leavitt, 46 Mich., 447.
In Wilde v. Wilde, 37 Neb., 891, an action for divorce, *587the rule was applied that the courts will refuse to enforce contracts which are manifestly contrary to public policy or sound morals. The following language is quoted from Luce v. Foster, 42 Neb., 818: “When any portion of the consideration is illegal, the promise cannot be enforced unless there are several promises, and that which relates to the bad consideration can be distinguished and separated from the others. In other cases the promise is unenforceable. All the text-writers so state the rule. (See, for instance, Wharton, Contracts, 339; Anson, Contracts, 191; Pollock, Contracts, 338.) The rule is so well settled that a reference to adjudications is unnecessary.” The first paragraph of the syllabus of Gould v. Kendall, 15 Neb., 549, is as follows: “No court of law or equity will lend its assistance in any way towards carrying out an illegal contract, therefore such contract cannot be enforced by one party against the other, either directly, by asking the court to carry it into effect, or indirectly, by claiming damages or compensation for a breach of it.” In the body of the opinion of the case last cited there is an analysis of the case of Brooks v. Martin, 2 Wall. [U. S.], 70, which by the supreme court of New Hampshire in Manchester & L. R. Co. v. Concord R. Co., supra, was cited as a leading case in support of the erroneous doctrine stated in section 721 of Morawetz on Private Corporations. By this analysis it was clearly shown by Judge Cobb that in the case of Brooks v. Martin a recovery was sanctioned, chiefly because between the parties litigant there had existed a partnership and the property of the partnership had been the product of the money furnished by the party who had brought the suit. The discussion of this proposition may fittingly be closed by quoting from the above mentioned opinion delivered by Judge Cobb his quotation from the language of Chief Justice Marshall in Armstrong v. Toler, 11 Wheat. [U. S.], 268, as follows: “Questions upon illegal contracts have arisen very often, both in England and in this country; and no principle is better settled than that *588no action can be maintained on a contract, the consideration of which is either wicked in itself, or prohibited by law.” No argument is necessary to illustrate the applicability of the rule just quoted to the facts of this case. The judgment of the district court is
Affirmed.
Irvine, C., did not take part in the determination of this case.