
964 So.2d 51 (2007)
KING DEVELOPMENT & REALTY, INC.
v.
Shahrokh ESLAMI.
2050543.
Court of Civil Appeals of Alabama.
March 23, 2007.
*52 Carl S. Burkhalter and Joshua D. Jones of Maynard, Cooper & Gale, P.C., Birmingham, for appellant.
Ferris S. Ritchey, Jr., and Nicholas J. Ritchey of Ritchey & Ritchey, P.A., Birmingham, for appellee.
THOMAS, Judge.
King Development & Realty, Inc., filed an unlawful-detainer action in Jefferson District Court against Shahrokh Eslami, demanding to recover the possession of real property it had leased to Eslami because, it alleged, Eslami had failed to pay rent. Eslami answered, denying that he had failed to pay rent, denying that King Development had a right to terminate the lease, and denying that King Development had a right to possession of the property.
The district court entered a judgment in favor of King Development; Eslami appealed to the Jefferson Circuit Court. The circuit court began a bench trial on August 31, 2005, during which the parties informed the court that they thought the matter could be settled. The court continued the case, and Eslami remained in possession of the premises while the parties worked toward a settlement.
After a dispute regarding the terms of a proposed settlement, Eslami filed a motion on October 21, 2005, to enforce a settlement agreement that, he said, had been reached by the parties. On October 31, 2005, King Development filed a motion in opposition, claiming that the parties had not reached a settlement agreement. On November 4, 2005, King Development filed a motion for a writ of restitution, seeking to be restored to possession of the leased premises.
At a hearing on all pending motions, Eslami argued that the parties had entered a binding settlement agreement whereby Eslami agreed that, by September 30, 2005, he would remove all furniture, inventory, and equipment from the premises  with the exception of certain refrigeration equipment that, he said, King Development had agreed to purchase  at which time Eslami would vacate the premises and owe no further rent. Eslami claimed that, in reliance upon the agreement, he had closed his business, sold off his inventory, and removed all furniture and equipment except the refrigeration equipment, but, he asserted, King Development had repudiated the agreement. Eslami sought damages for expenses incurred and profits lost, as well as an attorney fee. In response, King Development argued that the parties had not reached a settlement agreement. On December 9, 2005, the circuit court denied Eslami's motion to enforce settlement, denied King Development's motion to issue a writ of restitution, and, concluding that there were "several remaining unresolved issues between the parties," set the case for a bench trial on February 21, 2006.
The evidence at trial established that on March 1, 2004, the parties had entered into a five-year lease by which King Development leased to Eslami commercial property on which Eslami planned to operate a grocery store and delicatessen known as Ivy's Market. Eslami testified that, in *53 preparation for opening the market, he spent over $150,000 installing commercial refrigeration equipment  consisting of five refrigeration boxes, a 10-foot refrigerated drink box, a walk-in cooler, and several heavy compressors  that required specialized plumbing and wiring connections on the leased premises. The evidence established that the refrigeration equipment was not "the plug-in type," but was attached to the realty through "refrigeration lines and hard-wire electrical conduits." Eslami explained that, after he had installed his refrigeration equipment, King Development installed a new tile floor around, but not underneath, the equipment. In addition, King Development had a wall and some shelving built above the equipment.
Chris King, the president of King Development, operated a laundromat adjacent to Ivy's Market. Eslami testified that he paid the first three months' rent by personally taking a check to King at the laundromat next door. After King questioned Eslami's payment of the May 2004 rent, however, Eslami began paying the rent by taking a check each month to the office of King's attorney. Eslami continued that practice from June 2004 to November 2004. When Eslami went to the attorney's office to deliver his check for the December rent, the attorney's secretary told Eslami that she had been instructed not to accept the rent payments from Eslami anymore.
On the advice of his counsel, Eslami sent the rent payments for the months of December 2004 and January 2005 by certified mail to Chris King at the office of King Development. At trial, Eslami presented unopened envelopes containing his December and January rent payments that had been returned to him by the United States Postal Service. Each envelope bore a postal service notation indicating that three attempts had been made to deliver the envelope to King before it was eventually returned to Eslami. The trial court admitted the envelopes in evidence and opened them at trial, verifying that they did, in fact, contain the rent payments for December 2004 and January 2005.
On February 10, 2005, King Development filed the unlawful-detainer action. Eslami paid the rents for February and March 2005 by certified mail to Chris King at the office of King Development. Chris King testified that he had received the February and March checks. He stated that, because the unlawful-detainer action against Eslami was pending, he delivered the checks to his attorney to return to Eslami.
The circuit court entered a judgment on February 28, 2006, that states, in pertinent part:
"The Court having heard arguments of counsel, testimony of witnesses and upon review of all of the evidence submitted at trial, finds that [King Development] did not have grounds to terminate [Eslami's] lease for non-payment of rent when [King Development] refused to accept via certified mail rent sent by [Eslami].
"This Court recognizes that a Lessee's tenancy can be terminated for non-payment of rent. However, this Court does not find that to be the case here. It appears from the evidence presented to this Court that the behavior on the part of [Chris King] by refusing to accept payment for rent when tendered in a timely manner, was deliberate, calculated to lead to the termination of lease for `non-payment' of rent.
"This Court further finds that [Eslami] removed his merchandise and ceased doing business at [King Development's] property in September of 2005.
"It is hereby ordered, adjudged and decreed that:

*54 "1. That the Clerk of Court issue a check in the amount of $36,115.02 plus accrued interest to [King Development]. Said monies are being held pending the outcome of this hearing pursuant to Ala.Code, § 6-6-351.
"2. That [Eslami] pay [King Development] additional monies in the amount of $29,741.36 that should have been paid pursuant to § 6-6-351.
"3. That [Eslami] has 15 days from the date of this Order to remove refrigeration systems and other equipment from premises located at 1401 and 1405 15th Street South, Birmingham, AL without damaging [King Development's] property.
"4. That the Clerk of Court shall issue a Writ of Restitution to restore possession of the premises in 15 days from the date of this order.
"5. That [King Development] pay [Eslami] $29,741.31 in damages for unlawfully terminating [Eslami's] lease plus [Eslami's] attorney fees and costs for defending this action."
King Development appealed the judgment to the Alabama Supreme Court. The supreme court transferred the appeal to this court pursuant to § 12-2-7(6), Ala.Code 1975.

I.
King Development first argues that the circuit court erred by awarding Eslami damages of $29,741.31 for the unlawful termination of the lease because, it contends, the issue whether it unlawfully terminated the lease was neither pleaded by Eslami nor tried by the express or implied consent of the parties, as contemplated by Rule 15(b), Ala. R. Civ. P.[1]
Rule 54(c), Ala. R. Civ. P., states, in pertinent part:
"[E]very final judgment shall grant the relief to which the party in whose favor it is rendered is entitled, even if the party has not demanded such relief in the party's pleadings."
See also 2 Champ Lyons, Jr., & Ally W. Howell, Alabama Rules of Civil Procedure Annotated § 54.4 at 159 (4th ed. 2004) (stating that "a judgment shall grant relief to a defending party even though he has not demanded relief in his pleadings where evidence showed an undisputed right to such relief").
Citing Carden v. Penney, 362 So.2d 266 (Ala.Civ.App.1978), King Development asserts that, because Eslami did not file a counterclaim seeking damages for unlawful termination of the lease, it had no notice that it would be required to defend against such a claim. In Carden, this court held:
"Under the provisions of Rule 54(c) of the Alabama Rules of Civil Procedure it is the duty of the court to grant relief to which a party is entitled irrespective of the request for relief contained in the pleadings. However, Rule 54(c) does not sanction the granting of relief not requested in the pleadings where it appears that a party's failure to ask for particular relief has substantially prejudiced the opposing party. Moreover, if the relief granted pursuant to Rule 54(c) is not justified by the proof or is justified by proof which the opposing party has not had an opportunity to challenge, the relief granted should not be sustained *55 on appeal. Accordingly, logic dictates that in those situations where an opposing party has no notice, by pleadings or otherwise, regarding the claim upon which relief is granted by means of Rule 54(c) and is thereby denied an opportunity to have challenged or defended against such a claim, the opposing party has suffered substantial prejudice and the judgment granting relief must be reversed. Indeed, such a rule is fundamental to the essentials of due process and fair play."
362 So.2d at 268-69 (citations omitted).
Although Eslami did not file a counterclaim seeking damages for unlawful termination of the lease, he answered the complaint and specifically "denie[d] that his right to possession of the premises . . . ha[d] been lawfully terminated." In addition, Eslami's opening statement at trial put King Development on notice that Eslami was contesting the lawfulness of the termination of his lease. From the record:
"MR. F. RITCHEY [Eslami's counsel]: I would just like to say that this is an unlawful proceeding . . . brought against Mr. Eslami here, who was renting a piece of property from Mr. King . . . for hi[s] failing to pay rent for the months of . . . December 2004 and January, February, and March 2005. . . . We are claiming that rent was paid for those four months, but that [King Development] refused to accept the payment. . . . We are claiming that there was no basis for the unlawful-detainer decision [of the district court]."
Moreover, in response to evidence indicating that Eslami had sent his December 2004 and January 2005 rent payments by certified mail to Chris King at the office of King Development but that King had refused to accept the payments, Chris King attempted to refute Eslami's proof with the following testimony:
"Q. [By King's counsel] To your knowledge, . . . has [Eslami] ever tried to pay December of '04 or January of '05 rent to you at any time?
"A. No, sir.
"Q. And you were seeing him on a daily basis during that time, is that correct?
"A. At least twice a day, yes, sir."
We conclude that King Development has no basis upon which to argue that the issue whether it unlawfully terminated the lease was not properly presented and tried, thereby allowing the circuit court to rule on the merits of the issue, because the record reveals that, throughout the trial, Eslami argued that Chris King had an "ulterior motive" in seeking to evict Eslami and "manufactured" a reason to terminate the lease. For example, Eslami elicited testimony on cross-examination of King that King had been advised by his attorney that certain improvements made by a tenant, such as bathroom fixtures or refrigeration equipment, belonged to the tenant "as long as [the tenant] has a lease in place and pays his rent." King acknowledged that his attorney had also advised him that such fixtures and equipment "belong to the landlord . . . if [the tenant] defaults on the lease." On more than one occasion during the trial, Eslami argued that the inference to be drawn from such testimony was that Chris King, on behalf of King Development, had deliberately sought to evict Eslami in order to retain possession of the valuable refrigeration equipment that Eslami had installed.
We conclude that the issue of unlawful termination of the lease was raised in Eslami's pleading and was tried by the express or implied consent of the parties. In Hawk v. Bavarian Motor Works, 342 So.2d 355 (Ala.1977), the supreme court held that the issues in count seven of the plaintiff's complaint were "properly presented *56 and tried," 342 So.2d at 358, because "defendants had substantially answered the allegations of that count[,] . . . plaintiff introduced the issues . . . in his opening statement[, and] both plaintiff and defendants offered evidence directed to those issues," id.
Because King Development was not denied notice or an opportunity to challenge or defend against the claim that it unlawfully terminated Eslami's lease, the trial court was authorized to award Eslami relief on that claim pursuant to Rule 54(c).

II.
King Development next maintains that the award of damages to Eslami was contrary to law because, it says, Eslami did not produce sufficient evidence to allow the circuit court to assess damages without resorting to guesswork.
As paragraph 1 of the circuit court's judgment reflects, Eslami initially paid $36,115.02 in security pursuant to § 6-6-351, Ala.Code 1975.[2] Paragraph 2 of the judgment awards King Development $29,741.36, representing "additional monies . . . that should have been paid pursuant to § 6-6-351" after September 30, 2005. The award of $29,741.31 to Eslami in paragraph 5 of the judgment merely offsets the award to King Development in paragraph 2,[3] reflecting the circuit court's findings that
"[King Development] did not have grounds to terminate [Eslami's] lease for non-payment of rent when [King Development] refused to accept via certified mail rent sent by [Eslami]."
and
"[Eslami] removed his merchandise and ceased doing business at [King Development's] property in September of 2005."
The evidence was undisputed that, by September 30, 2005, Eslami had discontinued his business, had removed his inventory and furniture, and had arranged to sell his refrigeration equipment for its salvage value. The circuit court's award of $29,741.31 to Eslami did not award Eslami damages for the 16 months' of lost profits that Eslami undoubtedly experienced between September 30, 2005, and the date of trial, nor did it award Eslami the difference between the fair market value and the salvage value of his refrigeration equipment  damages awards that, had they been made, would have been speculative in light of the evidence presented. Instead, the circuit court's award to Eslami offset the rents that would have accrued from September 30, 2005, to the date of trial  rents to which King Development would have been entitled pursuant to § 6-6-351 had there been no unlawful termination of the lease.
The circuit court's award to Eslami did not require the circuit court to resort to "guesswork." It required only that the circuit court be convinced that King Development had unlawfully terminated Eslami's lease.

III.
Finally, King Development argues that the award of an attorney fee to Eslami was unauthorized by Alabama law.
*57 In Eagerton v. Williams, 433 So.2d 436, 450 (Ala.1983), the supreme court stated:
"In Alabama, attorneys' fees are recoverable only where authorized by statute, when provided in a contract, or by special equity, such as in a proceeding where the efforts of an attorney create a fund out of which fees may be paid."
This rule is known as "the American rule." Reynolds v. First Alabama Bank of Montgomery, N.A., 471 So.2d 1238, 1240 (Ala. 1985). Because Eslami is not entitled by a statute or a contract to receive an attorney fee, the circuit courts award must be justified, if at all, by the equitable exception.
In Reynolds, supra, the court reversed a trial court's judgment declining to shift the litigation costs, including attorneys fees, to the party that caused the plaintiffs' loss and created the necessity for the litigation. The court discussed the equitable exception to the American rule at length:
"In the United States Supreme Court case of Hall v. Cole, 412 U.S. 1, 93 S.Ct. 1943, 36 L.Ed.2d 702 (1973), the Court explained in no uncertain terms that the [American] rule may be overridden if the equities justify it. Justice Brennan, speaking for the Court, said:
"`Although the traditional American rule ordinarily disfavors the allowance of attorneys fees in the absence of statutory or contractual authorization, federal courts, in the exercise of their equitable powers, may award attorneys fees when the interests of justice so require. Indeed, the power to award such fees "is part of the original authority of the chancellor to do equity in a particular situation," and federal courts do not hesitate to exercise this inherent equitable power whenever "overriding considerations indicate the need for such a recovery." . . .
"`Thus, it is unquestioned that a federal court may award counsel fees to a successful party when his opponent has acted "in bad faith, vexatiously, wantonly, or for oppressive reasons. . . . In this class of cases, the underlying rationale of "fee shifting" is, of course, punitive, and the essential element in triggering the award of fees is therefore the existence of "bad faith" on the part of the unsuccessful litigant.
"`. . . . '
"[Hall v. Cole,] 412 U.S. at 4-5, 93 S.Ct. at 1945. (Footnotes omitted)."
Reynolds, 471 So.2d at 1242 (internal citations in Hall omitted). After reviewing other federal and Alabama state court decisions, the Reynolds court quoted from Corpus Juris as follows:
"`"Apart from the sums allowable and taxed as costs, there can, as a general rule, be no recovery as damages for the costs and expenses of litigation or expenditures for counsel fees. In cases of civil injury or breach of contract, in which there is no fraud, willful negligence, or malice, the courts have considered that an award of costs in the action is sufficient to cover the expenses of litigation and make no allowance for the time, indirect loss and annoyance.'"
Reynolds, 471 So.2d at 1243 (quoting Moss v. Winston, 223 Ala. 515, 517, 137 So. 303, 304-05 (1931), quoting, in turn 17 C.J. 807). The court summarized its holding:
"The obvious conclusion to be reached from this quote is that Alabama recognizes exceptions to the American Rule where fraud, willful negligence or malice has been practiced."
Reynolds, 471 So.2d at 1243.
We conclude that the facts presented to the circuit court in the instant case fall within the parameters of the "special *58 equity" exception to the American Rule discussed in Reynolds. The circuit court heard evidence from which it was authorized to find that Chris King, acting on behalf of King Development, maliciously and in bad faith refused to accept rent payments from Eslami, its tenant, with the intent to declare Eslami in default and to terminate the lease so as to gain possession of the valuable refrigeration equipment that the tenant had installed on the leased premises. Compare Hall v. Hall, 903 So.2d 78, 82 (Ala.2004) (acknowledging the existence of the special-equity exception to the American rule for cases in which the party sought to be charged with an attorney fee has been guilty of misconduct amounting to fraud, willful negligence, or malice, but holding that the "the trial court implicitly found that [the one against whom a fee was sought to be imposed] was not guilty of misconduct that would require such a sanction").
The circuit court made the following finding:
"It appears from the evidence presented to this Court that the behavior on the part of [Chris King] by refusing to accept payment for rent when tendered in a timely manner, was deliberate, calculated to lead to the termination of lease for `non-payment' of rent."
(Emphasis added.) The finding that King's action was "deliberate [and] calculated to lead to the termination of [the] lease" was tantamount to a finding of malice. See Ex parte Nall, 879 So.2d 541, 546 (Ala.2003)(stating that "malice is defined as `[t]he intent, without justification or excuse, to commit a wrongful act. . . .'" (quoting Black's Law Dictionary 968 (7th ed. 1999))); Willis v. Parker 814 So.2d 857, 863-64 (Ala.2001)(quoting Dillon v. Nix, 55 Ala.App. 611, 613-14, 318 So.2d 308, 310 (Civ.App.1975)) (stating that "`[m]alice in a malicious prosecution action has been defined as whatever is done willfully and purposely, whether the motive is to [injure the] accused, [or] to gain some advantage to the prosecutor. . . .'"); § 6-11-20(b), Ala.Code 1975 (defining malice as "[t]he intentional doing of a wrongful act without just cause or excuse, either . . . [w]ith an intent to injure the person or property of another person or entity or . . . [u]nder such circumstances that the law will imply an evil intent").
In essence, the circuit court could have determined that there was an equitable basis for awarding Eslami an attorney fee in the present case because King Development's bad-faith termination of the lease resulted in King Development's being unjustly enriched. See Humphrey v. Humphrey, 254 Ala. 395, 48 So.2d 424 (1950) (voiding the forfeiture of a lease when the tenant had made substantial valuable improvements to the leased premises, the location of the leased premises was the only one from which the tenant could operate his business, and the loss of that location would end the tenant's business).
The judgment of the Jefferson Circuit Court is affirmed.
AFFIRMED.
THOMPSON, P.J., and PITTMAN, BRYAN, and MOORE, JJ., concur.
NOTES
[1]  Rule 15(b) provides, in pertinent part:

"When issues not raised by the pleadings are tried by express or implied consent of the parties, they shall be treated in all respects as if they had been raised in the pleadings. Such amendment of the pleadings as may be necessary to cause them to conform to the evidence and to raise these issues may be made upon motion of any party at any time, even after judgment; but failure so to amend does not affect the result of the trial of these issues."
[2]  Section 6-6-351 allows a landlord "to execute on a favorable district court judgment during the pendency of an appeal to the circuit court if the appealing [tenant] does not provide adequate security to supersede the judgment. . . . [T]he security is . . . calculated based upon a defendant's actual monthly rent obligation accruing since the filing of a complaint in the district court." Adams v. Birmingham Towers, Ltd., 709 So.2d 1286, 1288 (Ala.Civ.App. 1998).
[3]  The $.05 difference in the two awards is apparently a clerical error.
