
68 Ill. App.3d 762 (1979)
386 N.E.2d 905
AMERICAN HERITAGE INVESTMENT CORPORATION, Plaintiff and Counterdefendant-Appellant,
v.
THE ILLINOIS NATIONAL BANK OF SPRINGFIELD et al., Defendants-Appellees.  (NATHAN HALE INVESTMENT CORPORATION, Counterplaintiff-Appellee.)
No. 14937.
Illinois Appellate Court  Fourth District.
Opinion filed February 14, 1979.
Rehearing denied March 27, 1979.
Robert H. Brunsman, of Springfield, for appellant.
Ensel, Jones, Blanchard & LaBarre, of Springfield, for appellees.
Order affirmed.
Mr. JUSTICE GREEN delivered the opinion of the court:
This case concerns a contract made on December 1, 1975, between plaintiff American Heritage Investment Corporation (American) and defendant Nathan Hale Investment Corporation (Hale Investment). The latter agreed to transfer to American its shares in Nathan Hale Life Insurance Co. (Hale Life) in exchange for which American agreed to pay to *763 Hale Investment $750,000 or transfer to Hale Investment 500,000 of Hale Investment's own shares or make payment by both shares and cash with the shares valued at $1.50 each.
On May 24, 1977, plaintiff filed suit in the circuit court of Sangamon County seeking specific performance of the contract. Hale Investment and Illinois National Bank, escrowee under the contract, were made defendants. Plaintiff appeals from the March 10, 1978, judgment of the trial court, the substance of which was to (1) declare the portion of the contract permitting American to make payment to Hale Investment in Hale Investment shares unlawful and unenforceable, (2) deny specific performance if consideration tendered by American included Hale Investment shares, and (3) grant specific performance of tender to be made entirely in cash.
Defendant Hale Investment answered the complaint denying some of its allegations and setting forth as an affirmative defense the provisions of section 6 of the Illinois Business Corporation Act (Ill. Rev. Stat. 1975, ch. 32, par. 157.6) which prohibits a corporation from purchasing its own shares, except under circumstances not involved here, when to do so would impair its capital structure. Hale Investment counterclaimed, seeking a declaration that because of section 6, the contract was illegal to the extent that it required a transfer to it of its own shares. Plaintiff American replied and set forth as affirmative defenses to the counterclaim that: (1) section 6 of the Business Corporation Act was not applicable; (2) Hale Investment's defense was a plea of ultra vires which could not be raised by the corporation; (3) the sale was not void and should be required to be performed because it had been substantially completed; and (4) Hale Investment was estopped to raise the defense of section 6. Various orders were entered prior to the evidentiary hearing on the merits. Appeal is taken from the order entered after that hearing.
Plaintiff American maintains on appeal that no showing was made that the sale would have impaired Hale Investment's capital and surplus accounts as defined in section 6 and reasserts the contentions of its affirmative defenses.
At all times in issue, section 6 of the Business Corporation Act provided in pertinent part as follows:
"A corporation shall have power to purchase, take, receive, or otherwise acquire, hold, own, pledge, transfer, or otherwise dispose of its own shares, provided that it shall not purchase, either directly or indirectly, its own shares when its net assets are less than the sum of its stated capital, its paid-in surplus, any surplus arising from unrealized appreciation in value or revaluation of its assets and any surplus arising from surrender to the corporation of any of its shares, or when by so doing its net assets would be reduced *764 below such sum. Notwithstanding the foregoing limitations, a corporation may purchase or otherwise acquire its own shares for the purpose of:
[functions not here applicable]." Ill. Rev. Stat. 1975, ch. 32, par. 157.6.
The parties agree that if section 6 is applicable and can be used as a defense, the status of the Hale Investment capital and surplus accounts on December 1, 1975, the date of the contract, is determinative as to whether its conveyance of its Hale Life stock in exchange for its own shares would violate that section. Defendant Hale Investment's Exhibit 4, its ledger for 1975, was admitted without objection. It showed a debit balance in the retained earnings account of $711,172.13 on January 1, 1975. The entries for the year showed a loss for the year and for the period up to December 1, 1975. There was thus obviously a substantial debit balance in the retained earnings account on December 1, 1975. As explained by witness Frank J. Baker, an accountant, and as is also obvious, if the retained earnings account of a corporation has a deficit, the net assets of the corporation are less than the capital and surplus accounts listed in section 6. Although there is dispute as to whether adjustments should have been made in Hale Investment's ledger accounts, plaintiff offered no proof as to what those adjustments should have been. In the absence of any such proof, a sufficient prima facie showing was made that Hale Investment's capital and surplus accounts were impaired within the meaning of section 6 on December 1, 1975. To have given up some of its assets, Hale Life shares, in exchange for its own shares would have further impaired those accounts.
 1 Plaintiff's assertion that section 6 of the Business Corporation Act is not applicable is based on its theory that the transaction did not involve a "purchase" by Hale Investment of its own shares as Hale Investment was merely receiving its own stock as partial consideration for the sale of Hale Life. However, the prohibition of section 6 is against a corporation purchasing its own shares "directly or indirectly." Black's Law Dictionary 1399 (4th ed. 1968) defines the word "purchase" as "Transmission of property from one person to another by voluntary act and agreement, founded on a valuable consideration [citations] * * *." Hale Investment's acquisition of its own shares here would appear to have been a direct purchase and, in any event, would have been an indirect purchase.
Plaintiff's contention that the sale was not void and should be enforced because substantially performed and its contention that Hale Investment is improperly attempting a defense of ultra vires are related and will be discussed together.
Section 8 of the Illinois Business Corporation Act at all times in question provided in part that:

*765 "No act of a corporation and no conveyance or transfer of real or personal property to or by a corporation shall be invalid by reason of the fact that the corporation was without capacity or power to do such act or to make or receive such conveyance or transfer, * * *." (Ill. Rev. Stat. 1975, ch. 32, par. 157.8.)
That section permits assertion of the corporation's lack of power only in certain types of proceedings brought (1) by shareholders against the corporation, (2) by the corporation against its officers, or (3) by the State against the corporation. Section 6 speaks in terms of setting forth the power of a corporation with the prohibition against capital impairment being a limitation upon that power. However, the issue of whether the corporation may raise the defense depends upon whether the questioned corporate act is merely beyond the power of the corporation or is illegal because it is immoral, against public policy, or expressly prohibited by statute. See 7A Fletcher, Cyclopedia Corporations § 3400, at 9 (perm. ed. 1978); Peoria Star Co. v. Cutright (1904), 115 Ill. App. 492.
In In re Estate of Brown (1970), 130 Ill. App.2d 514, 264 N.E.2d 287, an agreement between a decedent and the two petitioner companies provided that upon decedent's death, the companies or their designees would, for 90 days, have the option to purchase their stock from decedent's estate. The option was exercised but the executors of the estate refused and an action for specific performance of the agreement ensued. At the time the option was exercised, neither company had any earned surplus. The court recognized that the law long had prohibited a repurchase of stock by a corporation where its capital structure would be impaired or shareholders or creditors would suffer, and that the case of Precision Extrusions, Inc. v. Stewart (1962), 36 Ill. App.2d 30, 183 N.E.2d 547, had construed section 6 to require a corporation to have earned surplus for a stock repurchase. The appellate court held that the companies "were not legally permitted" to purchase the stock but that it might be done by designees of the corporations as that would not require relinquishment of assets of the corporations and thus would not impair their capital structure. 130 Ill. App.2d 514, 522, 264 N.E.2d 287, 292.
Precision Extrusions, Inc. concerned a suit by the assignee of the trustee in bankruptcy of a corporation, brought against directors of that corporation for damages for their violation of section 6. The appellate court explained that the drafters of section 6 intended to require that, subject to exceptions not involved here, a corporation purchase its own shares only out of earned surplus. The section was not drafted to so state, however, because of the difficulty of defining the phrase "earned surplus." Instead the act was drafted to prohibit purchase of such shares when its stated capital and various surplus accounts which were not earned surplus were impaired or when the purchase would impair them. The *766 phrase "earned surplus" was thus defined indirectly by eliminating any other type of surplus as a source of payment for such shares. See 1 Illinois Business Corporation Act Annotated § 6 (3d ed. 1975); Ballantine, A Critical Survey of the Illinois Business Corporation Act, 1 U. Chi. L. Rev. 357 (1934).
Plaintiff American cites a number of decisions of other courts which permitted enforcement of the provisions of agreements for stock repurchases by corporations even though such corporations had no earned surplus at the time of the agreement and a prohibitive statute similar to section 6 existed (Triumph Smokes, Inc. v. Sarlo (Tex. Civ. App. 1972), 482 S.W.2d 696; Witter v. Triumph Smokes, Inc. (5th Cir.1972), 464 F.2d 1078; Rainford v. Rytting (1969), 22 Utah 2d 252, 451 P.2d 769; Hawkins v. Mall, Inc. (Mo. 1969), 444 S.W.2d 369). These cases involved suits commenced after the transfer of the shares had been completed and brought against the corporation or its grantors to recover on instruments of debt given by the corporation in exchange for the shares. The opinions in these cases indicated that the purpose of the prohibitive statute was to protect the interests of creditors and other shareholders and that those interests would not be damaged by allowing recovery on the debt instruments. Plaintiff also cites Lewis v. Powell (Fla. 1967), 203 So.2d 504. There, a decree for specific performance of a contract to sell to a corporation its own shares was upheld. The court concluded that the lack of earned surplus to use in making the purchase did not prevent the corporation from purchasing the shares where there was no evidence of fraud nor of damage to creditors and there were no stockholders adverse to the purchase.
Here, plaintiff American emphasizes that the shareholders of Hale Investment were given notice of a meeting at which the transaction was approved and that since the evidence was undisputed that the price of $1.50 was fair, the shareholders would not be hurt. It also points out that Hale Investment had no substantial creditors who would be hurt by the capital impairment. It contends that under those conditions, we should follow the precedent of the cited foreign authority and require specific performance upon an exchange of stock even though the agreement of Hale Investment to purchase its shares may have been beyond its powers.
 2 In Brown, a decedent's executors objected to the exercise by two corporations of their option to purchase the decedent's shares in those corporations. The executors, in their representative capacities, succeeded to the ownership of the shares of the decedent and were, therefore, shareholders who, under section 8 of the Business Corporation Act, had standing to raise the violation of section 6 if that violation be considered to be only ultra vires. However, the Brown court spoke of the purchase of the shares by the corporations not as merely being beyond their power, *767 but as something they "were not legally permitted" (emphasis added) to do. We see nothing in Brown, Precision Extrusions, Inc., or Cate v. Pagel-Clikeman, Co. (1967), 87 Ill. App.2d 65, 230 N.E.2d 387, which discussed section 6 and found no violation, indicating that the courts of this State view contracts in violation of section 6 as merely being in excess of the corporation's power. We see no indication that the courts of this State would view each contract violative of the section and enforce the contract if it appeared that no one would be injured. Rather, we consider the rule of this State to be that such contracts are illegal as against public policy and will not be enforced. That public policy is to protect the capital structure of a corporation, a cushion for the benefit of creditors who may exist. See 7A Fletcher, Cyclopedia Corporations § 3620, at 248-49 (perm. ed. 1978).
 3 Although plaintiff correctly asserts that performance under the contract was substantially complete and the escrowee could soon have delivered the stock certificates to the respective parties, such substantial performance does not require a trial court to grant specific performance of a contract violative of public policy.
 4 Plaintiff argues that defendant Hale Investment is estopped to raise the issue that the purchase by it of its own shares voids that portion of the contract. It is difficult to see how conduct on the part of Hale Investment can prevent the court from refusing to order specific performance of a provision of a contract which violates a public policy directed not at the protection of Hale Investment but of its shareholders and creditors. Here, there is clearly no showing of any conduct on the part of Hale Investment creditors that would work an estoppel. Ordinarily, a corporation cannot be estopped to raise the issue of the illegal as distinguished from the ultra vires nature of its contract. 7A Fletcher, Cyclopedia Corporations § 3611, at 230 (perm. ed. 1928).
Regardless of whether conduct of Hale Investment could work an estoppel here, we do not find the record to show, as a matter of law, that defendant Hale Investment, through its officers, directors, or agents, made a misrepresentation of a material fact known by it to be untrue which induced American to enter into the contract or otherwise engaged in conduct that worked an estoppel.
As in Brown the trial court ordered performance under the contract only if it could be done in a way that would not violate section 6. If plaintiff chose to tender cash for the shares, performance of the contract would not impair the capital structure of Hale Investment. The requirement of the order that specific performance be made only if cash was tendered was proper.
Plaintiff requested a temporary injunction pending appeal restraining the officers, directors and agents of Hale Investment from interfering with *768 the operation and business of Hale Life. Our decision determining the conditions under which plaintiff is entitled to the ownership of the Hale Life stock makes this issue moot.
The order appealed is affirmed.
Affirmed.
MILLS and TRAPP, JJ., concur.
