Opinion by
Plaintiff, Dinosaur Park Investments, L.L.C., appeals the district court's judgment in favor of defendant, Fernando Tello, on Dinosaur Park's breach of contract claim, and the court's order awarding attorney fees to Tello. We reverse the judgment and order, and remand the case for further proceedings.
I. Background
In 2004, Dinosaur Park and Tello entered into an installment land contract whereby Tello agreed to make monthly installment payments and partial tax and insurance payments to Dinosaur Park for the purchase of an apartment complex. Dinosaur Park agreed to provide $30,000 to Tello (who took immediate possession of the property) for improvements to the property, and Tello agreed to contribute $12,000 toward improvements.
Alleging that Tello failed to make timely monthly installment payments, Dinosaur Park filed an action in district court asserting claims for breach of contract and appointment of a receiver. Tello, acting pro se, filed an answer to the complaint which stated, in its entirety, as follows:
*515 In response to the lawsuit case number 05CV64 the charges against me Fernando Tello are false, payments have been made and they are the ones not compiling [sic] with the contract. They have offered me to stop this lawsuit in exchange of me signing a listing contract to put the property up for sale.
Some time thereafter, the parties agreed that Dinosaur Park could sell the property to a third party, and Dinosaur Park did so. In response to a motion for summary judgment filed by Dinosaur Park, Tello asserted that the agreement to allow Dinosaur Park to sell the property modified the installment land contract.
Less than three weeks before trial, Tello filed a motion for leave to assert a counterclaim for unjust enrichment. The court denied that motion because it was untimely.
The trial was set to begin on Monday, October 2, 2006 (sixteen months after Dinosaur Park filed its complaint). The Friday before the trial was to begin, Tello, through his recently retained attorney, filed a motion (purportedly under C.R.C.P. 11) asserting that the installment land contract was void, and seeking a declaration to that effect and other remedies. Tello's motion was premised on section 88-85-1268), C.R.S.2007, which provides:
The buyer shall have the option of voiding any contract for deed to real property which fails to designate the public trustee as escrow agent for deposit of property tax moneys or for which no written notice is filed with the county treasurer's office or the county 'assessor's office. Upon voi-dance of such contract, the buyer shall be entitled to the return of all payments made on the contract, with statutory interest as defined in section 5-12-102, C.R.S., and reasonable attorney fees and costs. This avoidance right shall expire on the date seven years after the latest execution date on the contract for deed to real property unless exercised prior to such date.
The morning of the first day of trial, the court heard argument on whether Tello should be allowed to raise section 38-85-126 at trial. Dinosaur Park's counsel argued that (1) the statute is in the nature of an affirmative defense or counterclaim; (2) Tello had not timely raised the statute as an affirmative defense or counterclaim, and had therefore waived it; (8) Dinosaur Park would be prejudiced if Tello were permitted to raise the statute at trial because (a) it had not been able to conduct discovery on the issue, (b) it had not been able to prepare for trial on the issue, and (c) it would have additional claims and defenses related to the statute that it was not prepared to try (such as unjust enrichment relating to Tello's retention of rental payments while he was in possession of the property); (4) the statute was inapplicable because the property had been sold, thereby rendering the court unable to rescind the contract and put the parties in their original positions; and (5) Tello had effectively waived his right to void the contract because he had continually treated it as valid.
The court ruled that Tello would not be able to raise section 88-85-126 at trial, essentially agreeing with Dinosaur Park's latter two arguments. The case was tried to the court. After the parties had finished presenting their evidence, the court reiterated that it was not allowing Tello to assert any right under section 38-35-126.
In due course, the court issued its findings of fact, conclusions of law, and judgment. As relevant to this appeal, the court made the following findings of fact:
« Dinosaur Park did not timely provide the $30,000 for improvements.
accounting for rents he received was poor, and hence Dinosaur Park could not present evidence of rents Tello retained.
- Tello defaulted on the contract by failing to make timely installment payments.
Notwithstanding these findings and its earlier ruling that Tello would not be permitted to raise section 38-85-126 at trial, the court ruled that Tello was entitled to rescind the contract under that statute. The court stated that it had erred in ruling on the first day of trial that Tello could not raise the statute. In an effort to place the parties in the positions they were in prior to entering into the contract, the court ordered Dinosaur *516 Park to reimburse Tello for certain expenses he incurred in improving the property, totaling $31,000.
The court subsequently ordered Dinosaur Park to pay Tello $10,000 for attorney fees he had incurred in connection with his claim under section 88-85-126. (Subsection 38-85-126(8) provides that a party who opts to void a contract for failure to comply with subsection 38-85-126(1) may recover "reasonable attorney fees and costs.")
Dinosaur Park filed a timely motion under C.R.C.P. 59 to amend the court's findings and judgment, contesting the court's reliance on section 88-35-126 because the court had barred Tello from asserting a claim based on that statute. The court denied the motion.
II. Discussion
A. Affirmative Defense, Compulsory Counterclaim, or Neither?
Because the issue impacts our standard of review as well as the law governing the resolution of Dinosaur Park's primary contention on appeal-that the district court erred in allowing Tello to void the contract pursuant to section 38-85-126-we must determine whether Tello's claim to void the contract was in the nature of an affirmative defense or compulsory counterclaim, as Dinosaur Park contends, or neither, as Tello contends. Tello takes the position that his claim pursuant to the statute cannot be regarded as an affirmative defense or compulsory counterclaim, and hence subject to any bar for failing to timely assert it in this action, because the statute provides a seven-year period of limitations to seek to void a contract. We conclude that Tello's claim pursuant to the statute was an affirmative defense and a compulsory counterclaim, and we reject Tello's argument.
An affirmative defense is "a legal argument that a defendant ... may assert to require the dismissal of a claim or to prevail at trial." State v. Nieto,
Clearly, Tello's claim that the contract was void under section 38-35-126 was an attempt to avoid liability on Dinosaur Park's breach of contract claim. It was not a mere denial of an element of Dinosaur Park's claim, but rather a defense to the claim notwithstanding Dinosaur Park's ability to prove the elements of its claim.
Moreover, the primary remedy Tello sought was rescission, which is a defense or claim which must be pleaded in accordance with C.R.C.P. 8. Ice v. Benedict Nuclear Pharmaceuticals, Inc.,
Under the cireumstances here, Tello's claim that the contract was void under seetion 38-35-126 was also a compulsory counterclaim. '
A claim is "the aggregate of operative facts which give rise to a right enforceable in the courts...." Corporon v. Safeway Stores, Inc.,
C.R.C.P. 183(a) defines a compulsory counterclaim as:
any claim which at the time of filing the pleading the pleader has against any opposing part, if it arises out of the transaction or occurrence that is the subject matter of the opposing party's claim and does not require for its adjudication the presence of third parties of whom the court cannot acquire jurisdiction.
In applying this rule, we determine whether the defendant's claim has a logical relationship to the plaintiff's claim. Skyland Metropolitan Dist. v. Mountain West Enterprise, LLC,
Tello's claim under the statute arose out of and related directly to the same contract Dinosaur Park sought to enforee against him. If Tello were to prevail on that claim, Dinosaur Park could not prevail on its claim. Logically, Tello's claim was related to Dinosaur Park's claim, and therefore was a compulsory counterclaim. Cf. Conopco, Inc. v. Roll Int'l,
We are not persuaded by Tello's argument that the right to void an installment land contract under section 38-85-126 cannot be an affirmative defense or compulsory counterclaim because the statute gives a party seven years to seek to void the contract. To accept that argument would contravene the rule of waiver, discussed below, pertaining to affirmative defenses and compulsory counterclaims: it would mean that a party could recover on a contract in a legal action before the court, only to be hauled into court sometime later in an action to void the same contract. This would result in a multiplicity of suits over the same subject matter and potentially inconsistent judgments.
We also observe that every civil claim in Colorado is subject to some statute of limitations. See § 13-80-102(1)(), C.R.S.2007 (providing a two-year statute of limitations for "[all other actions of every kind for which no other period of limitation is provided"). To hold that the existence of a statute of limitations renders a counterclaim non-compulsory would therefore lead to the conclusion that there are no compulsory counterclaims. Tello cites no support for this conclusion, and we are aware of none.
B. Propriety of the District Court's Ruling
Both an affirmative defense and a compulsory counterclaim must be asserted in a party's responsive pleading (or amended responsive pleading) or they are waived. Crocker v. Colo. Dep't of Revenue,
Amendment of pleadings is permitted and governed by C.R.C.P. 15. After a responsive pleading is filed, a party may amend his pleading by leave of the court or the opposing party's written consent. C.R.C.P. 15(q). In addition, a pleading may be amended to conform to the evidence at trial if the new issue is tried by express or implied consent of the parties. C.R.C.P. 15(b).
Here, Dinosaur Park did not consent, in writing, expressly, or impliedly, to try the issues whether the contract was void under section 38-85-126 and, if so, what remedies were appropriate. Dinosaur Park's objections to trying those issues were clear and consistent, and the parties did not present evidence pertaining to those issues at trial, except to the extent any such evidence was relevant to the claims that were tried. Therefore, C.R.C.P. 15(b) is not implicated here, and the question before us is whether the district court erred in reversing its earlier decision and allowing Tello to amend his answer after trial under C.R.C.P. 15(a). We conclude that it did.
The determination whether to allow a party to amend a pleading under C.R.C.P. 15(a) is committed to the district court's sound discretion. Polk v. Denver Dist. Court,
Where, as here, a defense or claim is not pleaded or intentionally and actually tried, a court cannot render a judgment thereon. Bill Dreiling Motor Co. v. Shultz,
We further conclude the district court abused its discretion in effectively permitting Tello to amend his answer after trial because Dinosaur Park was clearly prejudiced. See Polk,
Further, the district court effectively precluded Dinosaur Park from seeking additional remedies to which it was entitled upon rescission of the contract. Where an installment land contract is rescinded under section 38-85-126, the party who sought enforcement of the contract is nonetheless entitled to recover the reasonable rental value of the property under a theory of unjust enrich ment. Haan v. Traylor,
Here, Dinosaur Park's counsel told the court on the morning of trial (when Tello's motion to raise the statute was heard) that it would assert an unjust enrichment claim in the event Tello was permitted to raise the statute at trial. Because the court refused to allow Tello to raise the statute at trial, Dinosaur Park did not assert an unjust enrichment claim. Had it known the court would permit Tello to raise the statute at trial, Dinosaur Park could have presented expert testimony on the reasonable rental value of the property. Though permitting Dinosaur Park to present such evidence would have required a continuance (as Dinosaur Park's counsel indicated), denying a continuance would have been an abuse of discretion because (1) Tello did not raise the statute until the day before trial, and therefore Dinosaur Park had no prior notice of the need for expert testimony on reasonable rental value; and (2) as the district court ultimately found, Tello's record keeping was so poor that neither party could have presented evidence of the actual rentals collected by Tello.
In sum, in allowing Tello to amend his answer after trial, the district court decided the case based on an issue that was not intentionally or actually tried and caused substantial prejudice to Dinosaur Park. Hence, the district court abused its discretion in deciding the case based on Tello's untimely assertion of section 88-835-126.
Tt follows that the district court's judgment must be reversed, as must its order awarding attorney fees to Tello. On remand, the district court should, consistent with the views expressed in this opinion, make additional findings and conclusions consistent with those that neither party has appealed, based solely on the record developed at trial.
The judgment is reversed, the order awarding attorney fees is reversed, and the case is remanded for further proceedings consistent with this opinion.
