On May 15, 1979, the Ayottes contracted to buy a lot in a subdivision from the Redmons. The contract required the Red-mons to build a road in accordance with county specifications as shown on the subdivision plat in order to provide access to the lot. The road was to be completed by July 30, 1980.
When the Redmons did not construct the road as agreed, the Ayottes alleged breach and filed suit for rescission and restitution, or in the alternative for damages. The Ayottes also prayed for attorney’s fees pursuant to a provision of the contract. The Redmons counterclaimed for the balance remaining to be paid under the contract.
After trial before the court without a jury, the district court entered findings of fact, conclusions of law, and judgment for the Ayottes. The court granted the Ay-ottes rescission and restitution. In addition the court granted the Ayottes attorney’s fees.
The Redmons appeal that part of the judgment awarding attorney’s fees of $3,900. Thus, we are presented with a single issue on appeal: When the district court grants a buyer rescission of a real estate contract after the seller’s breach, can the district court also award attorney’s fees to the buyer as provided for in the contract? We hold that under the circumstances of this case, attorney’s fees were properly awarded.
The instant contract provided:
[Njothing herein contained shall be construed as an election of remedies or as a waiver by the Sellers of any rights or remedies otherwise provided by law for breach of this contract and that in the event that either party retains counsel to institute suit hereunder or to otherwise enforce the terms of this contract, the losing party agrees to pay a reasonable sum as attorney fees for such services.
Contract. provisions for attorney’s fees such as this generally are enforced. E.g., Eimco Corp. v. Sims, 100 Idaho 390, 395, *727598 P.2d 538, 543 (1979); see I.R.C.P. 54(e)(5) (attorney’s fees allowable by statute or contract). No question exists that the Ayottes were forced to “retain counsel to institute suit” under the contract, and were the prevailing party. Under this contract provision, they would appear to be due their reasonable attorney’s fees.
The Redmons, however, argue that after the rescission of the contract, there was no provision upon which to base the award of attorney’s fees. For this proposition they cite Ellis v. Butterfield, 98 Idaho 644, 650, 570 P.2d 1334, 1340 (1977).1 The entirety of Ellis’ reasoning on this issue is as follows: “Having terminated the contract, they [the vendors of real estate] cannot later assert the attorney fee clause in it while defending successfully against appellants’ action to reinstate the contract.” Id. (footnote omitted).
Ellis is inapposite and does not control for two reasons. First, in Ellis the sellers had extrajudicially terminated the contract and forfeited out the buyers; thus, under the theory advanced by the sellers and accepted by the district court, the contract no longer existed at the time of trial. Here, to the contrary, the Ayottes (buyers) brought their action seeking a court decree rescinding the contract and granting restitution; thus, the contract remained in existence throughout the litigation and was only rescinded when the district court issued its judgment. Second, the Ellis contract only provided for attorney’s fees “to enforce any of their rights under this agree-ment_” Id. at 650 n. 6, 570 P.2d at 1340 n. 6. Arguably, this Court held that defending against the claimed right of reinstatement of the contract could not be construed as enforcing rights provided in the contract. In contrast, the instant provision awarded attorney’s fees whenever “either party retains counsel to institute suit hereunder.” Such is exactly what the Ayottes did, doing so when it appeared to them that it was necessary to follow this avenue. Similarly, in a suit where the plaintiff successfully sued to rescind a deed of trust and claimed attorney’s fees under the deed’s attorney’s fees clause, a California district court of appeals said:
Here, since the language of the deed of trust did not limit the situation in which attorney fees would be recoverable to any particular form of action involving the contract, the suit resulting in a judgment invalidating the purported agreement between the parties for lack of consideration and alternatively for intentional misrepresentation was an action “on • the contract” which permitted an award of attorney fees under section 1717. Star Pacific Investments, Inc. v. Oro Hills Ranch Inc., 121 Cal.App.3d 447, 463, 176 Cal.Rptr. 546 (Cal.App.3d Dist.1981).
In like fashion, the instant clause does not limit attorney’s fees awards to circumstances involving any particular forms of action, but rather allowed attorney’s fees whenever a party instituted suit to protect his rights. Of course, parties instituting suits will end up paying attorney’s fees if they are unable to persuade the court of their right to the relief they are seeking.
It is also to be noted that the Ayottes not only sued for rescission, but also defended against the Redmon’s counterclaim to enforce the contract. Had the Redmons reached the courthouse first and become plaintiffs in an action to forfeit the contract, and had the Ayottes in turn defended on the basis of breach or default on the part of the Redmons entitling them to rescission, and prevailed, there is no question but that the Ayottes would be entitled to attorney’s fees under the contractual provision here at issue. Who wins the race to the courthouse is not dispositive of the entitlement to attorney’s fees. That issue hinges on which of the parties prevails— not who institutes the civil action. The California Sixth District Court of Appeals held:
*728In an action to enforce the rescission of a written land sale agreement, containing a clause for attorney’s fees which does not limit recovery of such fees to any particular form of action involving the contract, the prevailing party is entitled to an award of such fees. Hastings v. Matlock, 171 Cal.App.3d 826, 840-42, 217 Cal.Rptr. 856, 866 (Cal.App. 6th Dist. 1985).
Accord, Preston v. McDonnell, 659 P.2d 276, 278 (Mont.1983); 12A C.J.S., Cancellation of Instruments § 135. We hold likewise.
As the Ayottes prevailed on appeal, and because the appeal is a continuation of the suit instituted under the contract, they are due attorney’s fees in this - Court. Hastings, supra, 171 Cal.App.3d at 842, 217 Cal.Rptr. at 867. The judgment below is affirmed.
Costs to respondents, including attorney’s fees.
DONALDSON, C.J., and SHEPARD, BAKES and HUNTLEY, JJ., concur.. The Redmons also cite Mecham v. Nelson, 92 Idaho 783, 451 P.2d 529 (1969); however, Mec-ham is inapposite, as this Court held the contract unenforceable because of failure of a condition precedent. Id. at 787, 451 P.2d at 533.