Plaintiff, as assignee of certain of the directors of the defendant corporation, brought this action against the corporation to recover the sum of $29,595.98, which was alleged to be owing plaintiff by reason of his assignors having executed and paid certain accommodation promissory notes for the corporation. The defendant corporation defaulted in answer, and certain of its stockholders intervened and denied liability of the corporation, on the ground that the indebtedness sued upon was incurred in excess of the statutory and charter limit of two-thirds of the paid-up capital stock of the corporation, and that, as to such excess, the indebtedness was ultra vires of the corporation. A trial to the court without the intervention of a jury resulted in a judgment for plaintiff in the full amount sued for. The interveners have appealed.
Defendant corporation was organized in June, 1915, under the laws of this state, with an authorized capital of $20,000, of which only $11,600 was issued. Pursuant to the requirements of section 462, Comp. St. 1922, the articles of incorporation fixed the highest amount of indebtedness or liability, to which .the corporation should at any time be •subject, at a sum not in excess of two-thirds of the paid-up •capital stock. The corporation purchased a grain elevator ;and operated the elevator, a coal yard, lumber yard and an *465agricultural implement business. Its capital was insufficient to carry on the several lines of business in which it engaged. The directors of the corporation, in order to raise money for it, executed their individual promissory notes to several banks. The proceeds of these loans were placed to the credit of the corporation and used by it in the transaction of its business. In 1920 the amount of these accommodation notes of the directors aggregated $69,500. At this time there was some dissatisfaction among the stockholders with the management of the corporation, and a new board of directors was elected. The old directors declined to surrender the management until they were relieved from liability upon their accommodation notes. Thereupon, the new directors executed promissory notes to the several banks for the aggregate sum of $69,500, and with these notes paid and discharged the accommodation notes of the old directors.
In 1921 it became apparent that the corporation was insolvent and was unable to meet its obligations and carry on its business. A committee of the stockholders was appointed to sell the tangible assets of the corporation and discharge its liabilities, to the extent of the proceeds arising from the sale. The committee performed this duty, and, after applying all of the proceeds to the payment of liabilities, there still remained due upon the accommodation notes, signed by the new directors, the sum of $29,595.98. These accommodation notes were paid by the directors, and they assigned their claims against the corporation to the plaintiff, who brought action against the corporation to recover the amount. The money advanced upon the accommodation notes of the directors went into the treasury of the corporation and was used by it in the transaction of its business.
It is evident that plaintiff, as assignee of the directors, who had been compelled to pay these accommodation notes, is entitled to be reimbursed by the corporation, unless the fact that the indebtedness incurred in excess of two-thirds of the paid-up capital stock of the corporation relieves the *466latter of liability. The amount that was paid to the directors from the sale of the corporate assets exceeded in amount two-thirds of the paid-up capital stock, so that all that remained unpaid is in excess of the amount of indebtedness that the corporation was authorized to incur.
As a general rule, the defense of ultra vires is available to a corporation when sued upon an executory contract which it had no authority to make. In many of the jurisdictions the rule obtains that, where a contract, ultra vires of a corporation, has been fully executed on one side, and the corporation has received and retained the benefits of the illegal contract, it will be estopped from urging the defense of ultra vires. The more logical view, however, is that a corporation that has received the benefits of a strictly ultra vires contract is not estopped to set up that defense when sued upon such contract, but the rule is generally recognized that a recovery may be had at least upon quantum meruit for the benefits received by a corporation under an ultra vires contract. A corporation may not, in violation of its charter, enter into a contract, whereby it receives and retains the benefits of its illegal contract, and then shield itself from liability for benefits received by pleading ultra vires as a defense. Healy, Owen-Hartzell Co. v. Montevideo Farmers & Merchants Elevator Co., 206 N. W. (Minn.), 646.
In many of the decisions of the courts of this country the view is taken that a recovery directly upon an ultra vires contract should be denied, but the courts adopting this view have generally striven to do justice between the parties, so far as could be done, consistent with adherence to law;, by permitting property or money, parted with on the faith of the unlawful contract, to be recovered back, or compensation made therefor. In such cases, the action is not maintained upon the unlawful contract nor according to its terms, but upon an implied contract of the corporation to return, or, failing so to do, to make compensation for, property or money which it has no right to retain. To maintain such an action is not to affirm, but *467to disaffirm, the unlawful contract. A recovery on quantum meruit for benefits received under the contract is allowed. 7 R. C. L. 678, sec. 680, 679, sec. 681.
The precise question, so far as we are aware, has not been heretofore decided by this court, but in Bank of College View v. Nelson, 106 Neb. 129, a contract, entered into by a bank to loan money in excess of that permitted by the statutes, was held enforceable, and the bank, for a breach of the contract, was held liable in damages. In principle, there seems to be no distinction between that case and the one under consideration. In the instant case, the defendant, pursuant to the contract, has received, used in its business and still retains the proceeds of the loans made by its directors. Since the identical money cannot be identified and recovered, the defendant should be required to make compensation to the extent of the benefits that it received. If defendant’s position is sound, then it would follow that the defendant corporation might have purchased grain from the farmers to the extent of $50,000, agreeing to pay therefor when the grain was sold and shipped. It might have thereafter shipped the grain and received the proceeds, and, if the defense of ultra vires were available, then it could have retained its ill-gotten gains and not have been required to respond for the benefits conferred. Such a rule is contrary to reason and justice and will not be sanctioned by the court. It may be urged that in this case the proceeds of the loan were invested in the business and lost, but the right to interpose ultra vires as a defense does not depend upon whether the corporation has made a provident-or 'improvident use of the property or money which it obtained by the illegal contract. The right of recovery depends upon the receipt and retention of benefits under or by virtue of the ultra vires contract.
We find no reason for disturbing the judgment of the district court.
Affirmed.