
792 P.2d 1089 (1990)
Robert C. TURTAINEN and Mari G. Turtainen, Plaintiffs and Appellants,
v.
H. Randolph POULSEN, Defendant and Respondent.
No. 89-507.
Supreme Court of Montana.
Submitted on Briefs March 29, 1990.
Decided May 22, 1990.
*1090 Stephen R. McCue, Harrison Loendorf & Poston, Helena, for plaintiffs and appellants.
Dale E. Reagor, Luxan & Murfitt, Helena, for defendant and respondent.
HARRISON, Justice.
This case is an appeal from a grant of summary judgment by the First Judicial District Court, Lewis and Clark County, Montana, in a real estate contract dispute. We affirm.
Appellants raise two issues for review:
1. Did the District Court err in finding appellants' claims barred by the doctrine of res judicata and the compulsory counterclaim rule?
2. Were appellants not required to assert their counterclaims for fraud and other related causes of action in respondent's earlier injunction action because the District Court proceeded with the injunction action on a summary basis?
On September 28, 1984, appellants purchased a lot in Mountain Heritage Tracts, Lewis and Clark County, from respondent who owned and lived on an adjoining lot. Respondent conveyed the property to appellants by warranty deed which included a number of restrictive covenants. On June 21, 1985, respondent filed a lawsuit against appellants seeking through an injunction to enforce the restrictive covenants. Specifically, respondent sought an injunction forbidding appellants from living on the premises in a trailer for a period in excess of twelve months and from engaging in certain nuisance-type activities such as leaving garbage on the premises and racing up and down the property with a motorcycle. At trial, the only issue before the court related to the trailer which the court decided in respondent's favor by issuing the requested injunction.
On September 16, 1986, appellants sued respondent over the September 28, 1984 contract for sale of the property. Appellants alleged that respondent had made various false representations to them that induced them to enter into the contract. The most harmful alleged misrepresentations were the following: (1) a representation that appellants could live in a trailer on the premises for an indefinite time; (2) that appellants were not informed of the presence of buried utility lines on their land; (3) appellants were told that an access road did not encroach on their land; (4) that the *1091 water system serving the land would be owned by a non-profit corporation; and (5) that the property was approved for FHA financing. Appellants' complaint alleged that respondent's false representations constituted fraud, unfair business practices, constructive fraud, negligent misrepresentation, breach of warranty of habitability and fitness for a particular purpose and breach of the implied covenant of good faith and fair dealing.
Respondent moved for summary judgment arguing essentially that the previous lawsuit barred appellants' claims, either through the doctrine of res judicata or the compulsory counterclaim rule. The District Court agreed. It found that the trailer issue was res judicata because whether the appellants could live on the premises in a trailer was specifically litigated in the previous lawsuit. Further, the District Court ruled that appellants' other claims were barred by the compulsory counterclaim rule because those claims were logically related to the contract for sale of the land which formed the basis of the previous lawsuit between the parties.
Rule 13(a), of Montana Rules of Civil Procedure governs compulsory counterclaims. In pertinent part Rule 13(a) provides:
A pleading shall state as a counterclaim any claim which at the time of serving the pleading the pleader has against any opposing party, if it arises out of the transaction or occurrence that is the subject matter of the opposing party's claim ...
Rule 13(a)'s mandate regarding compulsory counterclaims avoids needless multiplicity of suits. The rule "insures that only one judicial proceeding is required to settle all matters determinable by the facts or law and to bring all logically related claims into a single litigation." First Bank v. Fourth Judicial Dist. Court (1987), 226 Mont. 515, 521, 737 P.2d 1132, 1135-36, citing Julian v. Mattson (1985), 219 Mont. 145, 148, 710 P.2d 707, 709.
Appellants contend that the instant action does not arise out of the same transaction or occurrence as the previous lawsuit because the previous lawsuit related to appellants' conduct after the parties entered into the contract for sale of the property. The instant action, however, relates to respondent's conduct prior to the contract. Thus, appellants assert that the claims do not arise from the same aggregate of operative facts necessary to satisfy the logical relationship test. See Springs v. First Nat'l Bank of Cut Bank (D.Mont. 1986), 647 F. Supp. 1394. We disagree.
Plainly, both lawsuits arose out of the same aggregate of operative facts, the creation and execution of the contract for sale of land from respondent to appellants. The respondent filed the initial suit to enforce the contract. The timing of the disputed conduct in the first suit does not overshadow the fact that the sale of the property constitutes the underlying transaction which generated the dispute. At that time, appellants should have counterclaimed any claim they had concerning alleged misrepresentations respondent made that led to the creation and execution of the contract.
Appellants mistakenly rely on Citizens State Bank v. Duus (1969), 154 Mont. 18, 459 P.2d 696, as support for their contention that these two lawsuits relate to different transactions, or in other words that the appellants' claims were permissive counterclaims in relation to the first lawsuit. However, Citizens State Bank readily distinguishes itself from the instant case. In ruling that the counterclaim at issue in Citizens State Bank was permissive we stated:
This rendition illustrates that the claim and counterclaim involved different contracts, entered into at different dates between different parties, and further that the chattel mortgage securing the notes in the original action covered personal property located in Hamilton, Montana, whereas the real estate mortgage covered real property located in Darby, Montana. The original action was for non-payments of promissory notes and to foreclose a chattel mortgage while the cross-complaint and counterclaim was an action in tort. The measure of computation of damages thus, would be materially *1092 different. Obviously neither the issues of fact or law are the same and further, the same evidence would not support or refute defendants' claim and counterclaim. Thus, the counterclaim cannot be said to arise out of the transaction or occurrence surrounding plaintiff's claim based on the two promissory notes and chattel mortgage.
Citizens State Bank, 459 P.2d at 702. To the contrary, the claims in the instant case and the claims in the previous lawsuit relate to the creation and execution of a single contract relating to the same property and involving the same parties.
Although appellants argue that the two lawsuits require different proof, identical evidence is not required for compulsory counterclaims. First Bank, 737 P.2d at 1136. All that is required is that the claims be logically related. Appellants' claims logically relate to respondent's claims because they arise out of a single transaction, the sale of land.
Appellants further contend, citing Citizens State Bank as authority, that a counterclaim for legal relief can not be compulsory if the plaintiff's suit seeks equitable relief, as did respondent's initial lawsuit. Citizens State Bank does not support that contention. At most, Citizens State Bank stands for the proposition that defendants who interpose a permissive counterclaim for legal relief into an equitable suit are not entitled to a jury trial on the permissive counterclaim. Rule 13, M.R.Civ.P. makes no distinction between legal and equitable counterclaims or suits, but only between compulsory and permissive counterclaims. The general rule mandated by Rule 13(a), M.R.Civ.P. is that if a defendant's counterclaim is compulsory it must be pled regardless of whether the plaintiff's suit is legal or equitable in nature. If not pled, the compulsory counterclaim will be barred.
Next, appellants assert that their claim regarding FHA financing did not exist at the time they filed their answer in the initial suit, on July 24, 1985. They argue that they did not verify that FHA financing was unavailable until 1986. The District Court specifically noted that appellants' interrogatory answers revealed that they had been turned down for FHA financing in May and June of 1985. Thus, appellants had notice prior to filing their answer that problems with FHA financing existed. Interrogatory answers reveal that appellants were also turned down for FHA financing in 1986 and in 1987. However, appellants do not argue that the District Court erroneously determined that they had knowledge of problems with FHA financing prior to filing their answer. Thus we reject appellants' contention. We hold that Rule 13(a), M.R.Civ.P. bars appellants' nontrailer-related claims because the claims are compulsory and should have been pled in the initial suit.
Appellants also assert that the District Court erred in finding that appellants' claim regarding the trailer was res judicata. We disagree.
The doctrine of res judicata is firmly established to stand for the proposition that a party should not be able to relitigate a matter that that party has already had the opportunity to litigate, and the public policy that there must be some end to litigation. (Citation omitted; emphasis in original.)
First Bank, 737 P.2d at 1134. The following four criteria must be met before the res judicata doctrine will apply:
(1) the parties or their privies must be the same; (2) the subject matter of the action must be the same; (3) the issues must be the same, and must relate to the same subject matter; and (4) the capacities of the persons must be the same in reference to the subject matter and to the issues between them.
First Bank, 737 P.2d at 1135.
Appellants contend that the issue relating to the trailer is different in the instant case than the issue litigated earlier. The first lawsuit decided the issue of whether respondent made any representations regarding covenant no. 9, the trailer covenant, that constituted a waiver or estoppel of his right to enforce the contract. However, in the instant case the different issue is whether respondent defrauded appellants *1093 by exercising his legal right to enforce covenant no. 9 after representing to them prior to the sale that he would not do so. We fail to see a meaningful distinction between the two "issues." The second issue is merely another way of focussing on alleged statements respondent made prior to the sale regarding how long appellants could occupy a trailer on the property. The first lawsuit resolved that exact issue in respondent's favor. If appellants did not raise some particular claim for damages regarding the trailer dispute in the first lawsuit, they cannot do so now because they clearly had an opportunity to do so at that time. We hold that appellants' claim regarding the trailer is res judicata.
Appellants' second issue apparently relates to an exception to Rule 13(a), M.R. Civ.P. which appellants argue applies when the District Court proceeds on a summary basis in the initial suit. We will not address this issue. Appellants did not raise this issue before the District Court and we will not consider the issue for the first time on appeal. Wyman v. DuBray Land Realty (1988), 231 Mont. 294, 299, 752 P.2d 196, 200.
We affirm the District Court.
TURNAGE, C.J., and BARZ, WEBER and McDONOUGH, JJ., concur.
SHEEHY, Justice, concurring specially:
When this State in 1961 adopted its Rules of Civil Procedure to comport with the Federal Rules of Civil Procedure, it adopted the advances that had been made in procedure in the federal system to that time.
One of the casualties in the adoption of our Rules of Civil Procedure was the change of perception of the right to a counterclaim. Under former statutes, a counterclaim was defined as one which tended, in some way, to diminish or defeat the plaintiff's recovery. See section 9138, R.C.M. (1935). Because of that definition, this Court denied a counterclaim in Cook-Reynolds Company v. Wilson (1923), 67 Mont. 147, 150, 214 P. 1104, where plaintiff brought action to enjoin the defendant from interfering with plaintiff's harvesting operations, the defendant answered, claiming a share of the crop according to the terms of a contract constituting a counterclaim for the value of his share. Because of the counterclaim definition, this Court held the counterclaim was not allowable for two reasons, one, the action being for an injunction and the counterclaim seeking an affirmative judgment, the counterclaim did not in any matter tend to diminish or defeat plaintiff's recovery; and two, the cause of action which defendant attempted to make the basis of the counterclaim was not in existence at the time of the commencement of the action.
What Poulsen got in the first action brought in Lewis and Clark County was an injunction restraining the plaintiffs from certain activities on the described real property. The claims the plaintiffs now attempt to assert in their independent action would not tend to defeat or diminish, in some instances, the injunction obtained in the first action. Nevertheless, because compulsory counterclaims must now be pleaded under our present Rules of Civil Procedure, even though an injunctive order is here involved, the plaintiffs should have counterclaimed for all causes of action then in existence arising out of the same occurrence or transaction.
On another matter, I trust that the reader will not take the dicta in the majority opinion regarding Citizens State Bank v. Duus (1969), 154 Mont. 18, 459 P.2d 696, as anything more than dicta. In a proper case, I am not sure that the holding in Citizens State Bank respected the right to a jury trial is now in accord with the state of the law. The distinction between legal and equitable causes of action has been abolished in this State and any cause of action, legal or equitable, is now denominated a "claim" against which a compulsory or permissive counterclaim may be made. The right of trial by jury is under our State Constitution inviolate, and if a counterclaim comprised a cause of action which would formerly entitle the counterclaimant to a jury trial, the counterclaimant cannot be deprived of that right because the counterclaim is against a cause which formerly *1094 was recognized in equity. The federal cases conclude that there is no waiver of a jury trial even when a permissive counterclaim is filed. Thermo-Stitch, Inc. v. Chemi-Cord Processing Corp. (5th Cir.1961), 294 F.2d 486. In any event, the right to a jury trial can be preserved under Rule 13(i) of the Montana Rules of Civil Procedure, whereby the Court can order separate trials of any claims, cross-claims, or counterclaims. Thus, the right to a jury trial can be preserved.
HUNT, Justice.
I agree with and join in the special concurrence of Justice SHEEHY.
