
811 So.2d 506 (2001)
ALEXANDER, CORDER, PLUNK, BAKER & SHELLY, P.C.
v.
Durward JACKSON.
1000813.
Supreme Court of Alabama.
July 13, 2001.
Rehearing Denied August 31, 2001.
*507 Albert L. Jordan and Michael L. Jackson of Wallace, Jordan, Ratliff & Brandt, L.L.C., Birmingham; and James M. Corder, Jr., and Mitchell K. Shelly of Alexander, Corder, Plunk, Baker & Shelly, P.C., Athens, for appellant.
Donald R. Jones, Jr., Montgomery, for appellee.
HOUSTON, Justice.
The plaintiff Alexander, Corder, Plunk, Baker, & Shelly, P.C. ("the law firm"), appeals from a summary judgment in favor of the defendant Durward Jackson. We reverse and remand.
In November 1999, the law firm sued Jackson, alleging that Jackson had engaged the services of the law firm; that he had agreed to pay the law firm certain sums of money as a fee for the law firm's services; that the fee was provided for by an agreement of June 23, 1998; that he had failed and refused to pay the sums due the law firm; and that Jackson owed the law firm $80,000. In December 1999, Jackson answered, denying the allegations and contending that in regard to the matter in dispute the law firm had represented Canebrake Properties, L.L.C., and had never represented Jackson individually.
In August 2000, the attorney who had initially represented Jackson in regard to the law firm's action withdrew, and another *508 attorney began representing Jackson. In October 2000, the law firm amended its complaint to allege that Jackson owed it $180,000.
On November 6, 2000, Jackson moved for a summary judgment, asserting that the debt claimed by the law firm was a debt of Canebrake Properties, L.L.C.; that Jackson had been acting as an officer of Canebrake Properties, L.L.C., when he retained the law firm and that he had retained it to represent Canebrake Properties, L.L.C.; and that he never executed a document guaranteeing the debt or agreeing to be personally responsible for the fees incurred for the law firm's representation of Canebrake Properties, L.L.C. Jackson contended that Ala.Code 1975, § 8-9-2, Alabama's version of the Statute of Frauds, disposes of the law firm's claim against him; he says the claim is barred by the Statute of Frauds. Section 8-9-2 provides, in part:
"In the following cases, every agreement is void unless such agreement or some note or memorandum thereof expressing the consideration is in writing and subscribed by the party to be charged therewith or some other person by him thereunto lawfully authorized in writing:
". . . .
"(3) Every special promise to answer for the debt, default, or miscarriage of another."
On November 29, 2000, the law firm filed a response in opposition to the summary-judgment motion, contending that Jackson was precluded from raising the Statute of Frauds defense because it was an affirmative defense and had been waived when he failed to raise it in his answer and contending that the law firm had represented both Jackson and Canebrake Properties, L.L.C., and, thus, that both were liable for all fees incurred.
On December 7, 2000, Jackson filed an amended answer, alleging that the law firm's claim was barred by the Statute of Frauds. On January 8, 2001, the trial court entered a summary judgment in favor of Jackson. This appeal followed.
The law firm contends that the summary judgment was improper because, it says, when Jackson failed to affirmatively plead the Statute of Frauds defense in his answer, he waived the defense, and, thus, could not raise it in his summary-judgment motion. We do not agree.
In Bechtel v. Crown Central Petroleum Corp., 451 So.2d 793, 795-96 (Ala.1984), this Court stated:
"Crown correctly points out that it is within the court's discretion to allow the defendant to raise an affirmative defense after the initial answer to the complaint. In support of this proposition it quotes from Freeman v. Blue Mountain Industries, 395 So.2d 1049 (Ala.Civ.App. 1981):
"`Rule 15(a), [Ala. R. Civ. P.], expressly provides that amendments should be freely allowed when justice so requires.... The party opposing the amendment must show that the amendment would cause actual prejudice or undue delay in order to bar the amendment....'
"395 So.2d at 1050.
"The weakness in Crown's argument is that both Freeman and Rule 15(a) pertain to the amendment of pleadings. If Crown had attempted to amend its answer to raise the defense, the discretion of the trial court would have been invoked, and the burden would have been upon Bechtel to show that such amendment would cause actual prejudice or undue delay. This court has recently allowed a defendant to amend his answer in order to raise an affirmative defense after the defendant had filed a *509 motion for summary judgment based on the defense. Piersol v. ITT Drill Division, Inc., 445 So.2d 559 (Ala.1984). However, Rule 8(c) requires that in pleading, a party `shall set forth affirmatively' any matter constituting an affirmative defense. In Piersol, the defendant, after answering the complaint, filed a motion for summary judgment, alleging that he was entitled to such judgment based on the applicable statute of limitations. Some four months later, but before the court had ruled on the motion, the defendant filed an amended answer in order to raise the defense of the statute of limitations.
"In the case before us, five weeks lapsed between the filing of the motion for summary judgment and the court's hearing on the motion. There is no indication that Crown attempted to amend its answer during that time, or thereafter, although Bechtel had filed a `Motion to Strike Affirmative Defense' within one week after the summary judgment motion was filed.
". . . .
"It is clear that Bechtel made timely objection to the reliance on the affirmative defense in the motion for summary judgment, and equally clear that an amendment to the pleading to set forth the defense was not made. For this reason, the court erred in granting the summary judgment based on the defense."
In the present case, Jackson did amend his answer to include the Statute of Frauds defense before the trial court ruled on his summary-judgment motion. Thus, the Statute of Frauds defense was properly before the trial court and the trial court did not err by considering that defense when ruling on Jackson's summary-judgment motion.
The law firm also contends that § 8-9-2(3) does not bar its recovery because, it says, Jackson's promise to pay the legal fees was for his own benefit and was not a "special promise to answer for the debt... of another."
The law firm, relying on Schiffman v. H.L. Raburn & Co., 47 Ala.App. 390, 255 So.2d 332 (Ala.Civ.App.1971), contends that Jackson and Canebrake Properties, L.L.C., are joint obligors and that each is jointly and severally liable for the fees outlined in the June 23, 1998, fee agreement. The law firm points out that Jackson not only owned and controlled Canebrake Properties, L.L.C., along with other business entities, but also was the owner/developer of the entire Canebrake Project, a residential development and golf course, and it points out that Jackson's personal financial situation would have been adversely affected if a rock quarry had been located on property close to the Canebrake Project.
In Schiffman, 47 Ala.App. at 395, 255 So.2d at 337, the Court of Civil Appeals stated:
"In the case before us the trial court found that both the corporation and Morris Schiffman personally had a substantial interest in having the accounting work performed; that the plaintiff was employed by Schiffman, both in an individual capacity and as president of the corporation, and that both he and the company obligated themselves to pay for the work performed. This was tantamount to holding that Schiffman and the corporation, to both of whom the consideration passed, became simultaneously liable, jointly and severally, to pay for the work to be done, and that neither of them became security for the debt of the other."
Jackson, relying on Gregory v. Hardy, 53 Ala.App. 705, 304 So.2d 209 (Ala.Civ. App.1974), contends that the Statute of Frauds bars the law firm's claim. In *510 Gregory, 53 Ala.App. at 710-11, 304 So.2d at 213-14, the Court of Civil Appeals stated:
"The effect of the statute is that any promise to pay the debt of another must be in writing.... The courts have developed a method of classifying such promises by categorizing them either as `original' or as `collateral.' If a promise is `original,' it is said to be without the statute, and, if `collateral,' to be within the statute. Various tests have been devised by the courts to aid them in making this determination.
"One of the accepted tests of whether the promise is collateral is found in American Casualty Co. of Reading, Pa. v. Devine, 275 Ala. 628, 157 So.2d 661, wherein the supreme court said:
"`... if the transaction be such that the third person is responsible to the person who supplies the articles, the promise of the defendant is collateral, and, if oral, not binding, [citations omitted].'
"The case of Puckett v. Bates, 4 Ala. 390, was cited in Schiffman v. H.L. Raburn & Co., 47 Ala.App. 390, 255 So.2d 332, for the statement:
"`The law is certainly well established that if the person for whose debt, default or miscarriage the undertaking is made, be liable at all so that the whole responsibility does not rest upon the second promissor, the second promise is collateral, and is void by the statute if not reduced to writing....'
". . . .
"The principle enunciated by the cited cases is to the effect that if CPC be liable at all for the payment of the legal fees of plaintiffs, then the alleged promise of Gregory to be responsible also for the fees is collateral and, if not in writing, within the statute of frauds.
"The evidence overwhelmingly establishes that CPC was liable for plaintiffs' fees and that plaintiffs themselves so considered even after the alleged promise by Gregory. Further, it is without question that Gregory's alleged promise of January 19, 1973, was oral and not in writing; consequently, such a promise is collateral, within the statute of frauds, and hence not binding on Gregory."
The law firm, on July 2, 1998, issued an invoice for $30,000, addressed to "Canebrake Properties, L.L.C." On July 7, 1998, Canebrake Properties, L.L.C., issued a $30,000 check to the law firm. The law firm, on November 3, 1998, and January 6, 1999, issued invoices for a $50,000 installment it said was due October 1, 1998; those invoices were addressed to "Mr. Durwood Jackson, Canebrake Properties, L.L.C." These invoices remain unpaid.
When considering Jackson's summary-judgment motion, the trial court had before it numerous exhibits, including the June 23, 1998, fee-arrangement letter; the complaint in Canebrake Properties, L.L.C. v. Rogers Group, Inc. et al; invoices from the law firm dated July 2, 1998, November 3, 1998, and January 6, 1999; a $30,000 check, dated July 7, 1998, from Canebrake Properties, L.L.C., to the law firm; a September 16, 1999, letter from the law firm advising Jackson that the $50,000 and $30,000 payments were overdue and that the law firm intended to withdraw from its representation of Jackson and his companies; the depositions of John Plunk (a member of the law firm) and Durward Jackson; and the affidavit of Walton Ashwander (the project manager for the Canebrake Project).
In his deposition, Plunk testified:
"Q. Tell me what you are going to testify about [regarding] the conversation that was the first one on June 22 as *511 it relates to [Jackson's] personal responsibility as you allege in the complaint.
"A. He explained to us at that time that the company that owned the property, that it was him personally, that it was a company that he owned or controlled, that there were two or three and we didn't get into specifics at that meeting because he didn't know. He said his lawyers had drawn up different companies and he would get us whatever information we needed. Jim [Alexander, another member of the firm,] explained to him that you bring a lawsuit, you have to bring it in the name of a party [in] interest. A great deal of my work I deal with closely held corporations that are also thinly capitalized almost on a daily basis. It is routine that the principals in those entities have to personally guarantee debts to the bank, contract, etc. We discussed that with him. We said if we are going to get into the company's paying us, then we need financial statements, we need to know what assets they own, we need to know their ability to pay. We don't want to do that, he didn't want to do that. He said `I will pay it.' We said fine.
"He also said, `My wife knows more about the bookkeeping and the way things are set up.' He said, `You know we may pay you because it is tax advantageous to us and you are benefiting a company if you are doing work on this lawsuit. You may be paid by XYZ company.'
"Q. You didn't ask him to sign any personal guarantee or anything like that?
"A. No.
"Q. You didn't ask him to sign any sort of fee agreement, did you?
"A. No.
"Q. Well, you sued on behalf of Canebrake Properties, L.L.C. [in the earlier action related to the rock quarry]?
"A. Correct.
"Q. That's the plaintiff in the lawsuit?
"A. That's correct.
"Q. When you sent your statement on the second of July, you sent it in the name of Canebrake Properties, L.L.C., correct?
"A. Correct.
"Q. So had you asked Mr. Jackson to be responsible for the fees that were incurred in your representing Canebrake Properties, L.L.C.?
"A. Yes.
"Q. And that's the way you thought of it in your mind?
"A. Absolutely. Again, we explained to him and he knew. He said that he had had to personally guarantee debts that he had had companies, corporations, whatever [sic]. He understood that and he didn't want to get into that. That it was no need to give us financial statements for those companies[,] that he was going to pay for it[,] that they were his companies.
"Q. So he told you that he would basically guarantee their debt to you?
"A. No, he just said `I'll pay it.'
"Q. Tell me why the bills changed. Do you know?
"A. The first one is the only one that I can remember because I think I was responsible for sending it out. I asked Walton [Ashwander]. I said Mr. Jackson said he was going to check with Mrs. Jackson or somebody would and he would let us know who was going to pay it.
"Q. Did you give it to Walton?
"A. No. I asked him to tell me who to bill. One of the ladies, I don't know if it was the name he mentioned. I didn't know any of the ladies that worked there. It could have been Mrs. Jackson, *512 I don't know. One of the ladies called from out there, identified themselves and said you know I'm working out here with Walton, you need to bill that to whoever we billed it to. That was the first one. After that, I don't know. I didn't send those out.
"Q. Other than the conversation you just described to me where Mr. Jackson acknowledged that he had been required to guarantee things in the past, he had other corporations and where he agreed to pay the bills of the entity you were suing on behalf of, did y'all talk about his being personally responsible for any of your bills on any other occasions?
"A. The second meeting when he came to review the complaint.
". . . .
"Q. No. I'm not taking about meeting one. I'm talking about meeting two. You just asked him if the letter was okay.
"A. I said `Did you get the letter about the fee?' He said `Yes.' I had it with me. If I had done something that he didn't understand, I wanted him to correct it. We were going to take care of it then.
"Q. But it is not your testimony that you and he specifically discussed him being personally responsible for payment of your fee while y'all were talking about that letter on the second occasion, is it? I'm not trying to confuse you. You told me you asked him about the letter and he said it was fine. I just wanted to make sure that in January if we get to trial, you don't say I specifically asked him about this provision and said you understand that this is you, not the company?
"A. No. No, I did not do that."
In his affidavit, Ashwander stated the following:
"Within a few weeks of learning about the proposed quarry, I was approached by Mr. [John] Plunk of the firm Alexander, Corder, Plunk & Baker, P.C., who I knew from Rotary Club. Mr. Plunk indicated that he was aware of the situation and the applicable law. He stated that he and his firm had some theories about how the Rogers Group's quarry might be stopped. Following our conversation, I arranged for a meeting with Mr. Plunk, his partner, Mr. [Jimmy] Alexander, Durward Jackson, and me. Based on the correspondence I have seen, I believe that the meeting occurred on June 22, 1998. I was present during the entire first meeting. The attorney fee arrangement was discussed during the first meeting. Neither Mr. Alexander nor Mr. Plunk ever requested and Durward Jackson never agreed to personally guarantee fees incurred by Mr. Alexander's law firm for representing Canebrake Properties, L.L.C. I am certain that Mr. Jackson being personally responsible for the fees was never discussed at the meeting. After the first meeting, I even had an employee call the firm and confirm that Canebrake Properties, L.L.C., was the legal entity which would be filing the suit and would be responsible for payment of the bills."
In his deposition, Jackson testified:
"Q. Give me your contentions of why you do not owe this firm any money....
"A. Because I never contracted with this firm, Canebrake did."
"This distinction [as set out in the first paragraph quoted earlier from Gregory v. Hardy,] between `original [promises],' and collateral [promises],' focuses on the nature of the promise made." Herrington v. Cent. Soya Co., 420 So.2d 1, 3 (Ala.1982).
"`Although the terms "original" and "collateral" do not obviate the difficulty of determining the ultimate question as to whether a promise is or is not within the Statute, they afford a convenient mode of expression for distinguishing *513 between the cases within and those without the Statute: "The terms original and collateral promise, though not used in the Statute, are convenient enough to distinguish between the cases where the direct and leading object of the promise is to become the surety or guarantor of another's debt, and those where although the effect of the promise is to pay the debt of another, yet the leading object of the undertaker is to subserve or promote some interest of purpose of his own."'"
Herrington, 420 So.2d at 3 (quoting Samuel Williston, Treatise on the Law of Contracts § 463 (Walter H. Jaeger ed., 2d ed.1960)). "[I]t ordinarily is a question for the jury whether an agreement is an original undertaking by the promisor or a collateral promise to answer for the debt, default, or miscarriage of another." United Companies Fin. Corp. v. Brown, 584 So.2d 470, 473 (Ala.1991).
In his deposition, Plunk testified that at the initial meeting between Jackson and the law firm, Jackson explained that he owned and controlled several companies, including the company that owned the property where the Canebrake Project was being developed, and, thus, that there was no need for him to give the law firm financial statements on his companies because those companies belonged to him and he was going to "pay for it." The law firm argues that Jackson's personal financial situation would have been adversely affected if a rock quarry had been located on property close to the Canebrake Project and that the leading object of Jackson's agreement to pay the legal fees was to promote his own interest.
"A contract that all or part of a duty of a third person to the promisee shall be satisfied is not within the Statute of Frauds as a promise to answer for the duty of another if the consideration for the promise is in fact or apparently desired by the promisor mainly for his own economic advantage, rather than in order to benefit the third person."
Restatement (Second) of Contracts, § 116 (1981). Section 116 of the Restatement also states what is often called the "main-purpose" or "leading-object" rule: Was the "main purpose" of Jackson's agreement to pay the legal fees to promote his own interest?
On review of a ruling on a summary-judgment motion, we consider the evidence that was before the court when it ruled on the motion, to determine whether it created a genuine issue of material fact, and, if it did not, whether the movant (Jackson in this case) was entitled to a judgment as a matter of law. Rule 56(c)(3), Ala. R. Civ. P. As the moving party, Jackson had the burden of establishing that there was no material fact in dispute. Lott v. Tarver, 741 So.2d 394, 396 (Ala.1999). In conducting this review, we consider all of the relevant undisputed evidence and we view relevant disputed evidence in a light most favorable to the nonmovant (in this case, the law firm); and we resolve all reasonable doubts against the movant. Wally's, Inc. v. Intergraph Corp., 727 So.2d 34, 37 (Ala.1998).
We conclude that the evidence created a genuine issue of material fact as to whether Jackson's promise to pay the legal fees was original, and thus without the Statute, or was collateral, and thus within the Statute. Thus, we reverse the summary judgment in favor of Jackson and remand for proceedings consistent with this opinion.
REVERSED AND REMANDED.
MOORE, C.J., and LYONS, JOHNSTONE, and WOODALL, JJ., concur.
