
565 So.2d 234 (1990)
Charles R. SALISBURY
v.
H. Charles SEMPLE.
89-281.
Supreme Court of Alabama.
June 29, 1990.
Davis Carr and Stephen L. McDavid, Mobile, for appellant.
Vincent F. Kilborn and M. Lloyd Roebuck, Mobile, for appellee.
SHORES, Justice.
This appeal involves a declaratory judgment action seeking to set aside a contract between two ophthalmologists. Each party filed a motion for summary judgment; the trial court granted the defendant's motion, and held that the contract was enforceable. From that order, the plaintiff has appealed. We affirm.
The defendant, Dr. H. Charles Semple, is an ophthalmologist who began practicing in Mobile, Alabama, in 1962. In 1984, the plaintiff, Dr. Charles R. Salisbury, joined the defendant's practice as an associate ophthalmologist. In 1985, the defendant decided to retire from the practice of medicine. The defendant agreed to sell his medical practice, including the equipment, goodwill, and an optical business, to the plaintiff. The parties entered into a written purchase/sale agreement on July 24, 1985. The agreement provided that the *235 maximum purchase price would be $900,000, payable over an 11-year period. The payments were to be made in monthly installments; part of the payment was a fixed amount and part of the payment was a percentage of the plaintiff's gross income. Paragraph 7 of the agreement provided:
"Seller and Purchaser hereby agree that thirty (30%) per cent of the payments made by Purchaser to Seller hereunder shall be considered as and for Good Will or such other term as may be applied or considered by the Internal Revenue Service to be long term capital gains."
Paragraph 13 of the agreement provided:
"Seller, in consideration of payments hereunder other than for Good Will, hereby covenants and agrees with the Purchaser not to engage in the practice of Ophthalmology or the retail optical business, or in any manner in competition with Purchaser, for a period of eleven (11) years from the date hereof and within a radius of one hundred (100) miles of the business address of Purchaser last known to Seller in Mobile County, Alabama, and further agrees not to actively solicit, in any manner or respect, former patients of Seller or Purchaser; nor do anything in prejudice of said Purchaser's medical practice or optical business."
The plaintiff made monthly payments pursuant to the contract until 1989; when he ceased making payments, the plaintiff had paid a total of $374,778 to the defendant. On September 12, 1989, the plaintiff filed this action, seeking a declaration that the purchase agreement was void and unenforceable because it contained a covenant not to compete. The plaintiff does not allege that the defendant violated the covenant not to compete. In the complaint, the plaintiff further alleged that the defendant owed him $143,444 because that amount was overpaid by mistake under the agreement.
The plaintiff filed a motion for summary judgment on October 5, 1989. In support of his motion, the plaintiff later filed the affidavit of Terry Buck, his accountant. Buck stated in the affidavit that, for the purpose of setting up bases for tax preparation on the assets purchased from the defendant in 1985, he made the following calculations: He reduced the projected payout under the contract to a net present value of $485,336; he valued the goodwill of the business at $145,751 (30% of present value); he valued furniture and fixtures at $10,000; he valued equipment at $59,583; he valued the leasehold improvements at $12,000; and he valued the non-competition clause at $258,502. These valuations were not set out in the purchase agreement, but only in Buck's affidavit, which was filed November 3, 1989.
On October 19, 1989, the defendant filed a counterclaim alleging breach of contract, fraudulent deceit, and misrepresentation. He demanded a judgment in the amount of the entire balance under the contract. On November 6, 1989, the defendant filed a motion for summary judgment on both the declaratory judgment action and on the breach of contract count of his counterclaim. In support of his motion, the defendant filed his sworn affidavit. In the affidavit, the defendant stated that he retired from the practice of medicine due to his own declining health. The defendant stated that although the plaintiff was aware that he could no longer continue to practice, the plaintiff suggested that a covenant not to compete be inserted into the purchase agreement. The defendant testified further in his affidavit that he agreed to the plaintiff's suggestion, but that his agreement to that covenant was not substantial consideration for the purchase price because the plaintiff knew that the defendant could not compete with the plaintiff for health reasons. According to the affidavit, the defendant suspected that he was not receiving from the plaintiff the amount of money he was actually owed, so he requested an examination of the records as provided for in the purchase agreement. Thereafter, the plaintiff filed the declaratory judgment action and failed to make further timely payments.
After hearing the arguments of counsel on their cross motions for summary judgment, *236 the trial court granted the defendant's motion on the declaratory judgment action and made it final pursuant to Rule 54(b), A.R.Civ.P. The trial court determined that this case is factually similar to Mann v. Cherry, Bekaert & Holland, 414 So.2d 921 (Ala.1982), and held that the plaintiff was estopped from using the non-competition clause to escape liability from his obligation under the contract.
On appeal, the plaintiff concedes that the portions of the contract relating to the transfer of the physical assets and goodwill are enforceable, but he argues that the portion of the contract relating to the covenant not to compete is void and unenforceable. Because 70% of the purchase price was allocated to the covenant not to compete, contends the plaintiff, he is obligated to pay only 30% of the contract price.
Section 8-1-1(a), Ala.Code 1975, provides:
"Every contract by which anyone is restrained from exercising a lawful profession, trade or business of any kind otherwise than is provided by this section is to that extent void."
The practice of medicine is a profession under the terms of this statute. However, this Court has held that the inclusion of a covenant not to compete in a contract does not necessarily render void the entire contract. Mann v. Cherry, Bekaert & Holland, 414 So.2d 921 (Ala.1982). The statute itself provides that a contract containing a covenant not to compete "is to that extent void." The contract remains otherwise valid. Therefore, the entire agreement in this case is not made void by the fact that it included the disputed clause.
The trial court correctly found that this case is factually similar to Mann. In Mann, the parties agreed to the purchase and sale of an accounting practice. The contract contained mutual non-competition covenants; those covenants and a client list were the stated consideration for the contract. The parties stipulated that neither had violated the covenants not to compete. However, the purchaser stopped making payments to the seller after concluding that the covenants rendered the contract void. This Court, through Justice Adams, held that the buyer, who had received all that he had bargained for, should not be allowed to use the unenforceability of the non-competition clauses to avoid his contractual obligations. In Mann, we held that the following principle applied to the facts of that case:
"`If a contract, although not originally binding for want of mutuality, is nevertheless executed by the party not originally bound, so that the party asserting the invalidity of the contract has actually received the benefit contracted for, the latter will be estopped from refusing performance on his part on the ground that the contract was not originally binding on the other, who has performed. [Citation omitted.]'"
414 So.2d at 925, quoting Hay v. Fortier, 116 Me. 455, 458, 102 A. 294, 295 (1917). Based on that reasoning, we affirmed the trial court order that upheld the remainder of the contract and required the buyer to pay the agreed purchase price.
The same result is required in the case now before us. The plaintiff admits that the defendant has not violated the covenant not to compete. Furthermore, the plaintiff received the defendant's medical practice, the fixtures, the optical business, and the goodwill, as contemplated by the contract. In short, the plaintiff has received all that he bargained for. We hold that the plaintiff, like the buyer in the Mann case, is now estopped from refusing to perform his obligation to pay the agreed purchase price under the contract simply because it contains a covenant not to compete. We note that any other result would be particularly inequitable in view of the fact that the covenant not to compete was included in the contract at the plaintiff's request.
For the foregoing reasons, the judgment of the Circuit Court of Mobile County is affirmed.
AFFIRMED.
HORNSBY, C.J., and JONES, HOUSTON and KENNEDY, JJ., concur.
