delivered the Opinion of the Court.
¶1 This is an appeal from the decision and order on motion to dismiss of the First Judicial District Court, Lewis and Clark County, dated August 18,1997, wherein the court granted defendant’s motion to dismiss plaintiffs’ complaint on the basis that the complaint raises matters involving compulsory counterclaims in a related cause of action. We affirm.
BACKGROUND
¶2 In April 1996, Kevin Connor, d/b/a Kevin Connor Construction (Connor), filed a lien foreclosure action against Michael J. Zimmerman and Gail L. Zimmerman (Zimmermans). That cause of action, Lewis and Clark County Cause No. ADV 96-438, was tried to a jury in December 1997, and resulted in a verdict for Connor.
¶3 In the instant cause of action, Zimmermans claim that Connor contracted with Zimmermans to remodel and expand the business premises of Zimmermans in Helena, Montana, known as the “Country Kitchen.” Zimmermans contend that Connor negligently failed to protect the roof of the building from heavy rain during the construction process with the result that the building was damaged by flooding. Zimmermans claim various damages as a result of Connor’s al*150leged negligence, including structural damages, loss of income, loss of rent and other expenses.
¶4 Connor moved to dismiss Zimmermans’ complaint contending that Rule 13(a), M.R.Civ.R, precluded Zimmermans from litigating their cause of action because their claims were compulsory counterclaims that were required to have been asserted in the lien foreclosure action which Connor filed against Zimmermans. Following briefing, the First Judicial District Court, Lewis and Clark County, ruled on the basis of our decision in Julian v. Mattson (1985), 219 Mont. 145, 710 P.2d 707, that Zimmermans’ claims were in fact compulsory counterclaims in the lien foreclosure action and that as such, Zimmermans’ complaint was barred, and was subject to dismissal.
¶5 This appeal followed.
ISSUE
¶6 The sole issue on appeal is whether the court correctly concluded that the claims in Zimmermans’ complaint were compulsory counterclaims under Rule 13(a), M.R.Civ.R
STANDARD OF REVIEW
¶7 The District Court’s decision to dismiss a complaint on the basis of Rule 13(a), M.R.Civ.R, is a conclusion of law. We review the legal conclusions of a trial court de novo. We simply determine whether the tribunal’s interpretation of the law is correct. See Boreen v. Christensen (1994), 267 Mont. 405, 408, 884 P.2d 761, 762.
DISCUSSION
¶8 Rule 13(a), M.R.Civ.R, provides:
Compulsory counterclaims. 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 and does not require for its adjudication the presence of third parties of whom the court cannot acquire jurisdiction. But the pleader need not state the claim if (1) at the time the action was commenced the claim was the subject of another pending action, or (2) the opposing party brought suit upon the claim by attachment or.other process by which the court did not acquire jurisdiction to render a personal judgment on that claim, and the pleader is not stating any counterclaim under this Rule 13.
*151¶9 [2] As stated in our decision in First Bank Missoula v. District Court (1987), 226 Mont. 515, 737 P.2d 1132, the purpose of this requirement is to avoid a multiplicity of suits by requiring the parties to adjust, in one action, their various differences growing out of any given transaction. First Bank Missoula, 226 Mont. at 521, 737 P.2d at 1135 (citing Friedrichsen v. Cobb (1929), 84 Mont. 238, 275 P. 267). “This 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 Missoula, 226 Mont. at 521, 737 P.2d at 1135-36 (citing Julian, 219 Mont. 145, 710 P.2d 707).
¶10 As we pointed out in First Bank Missoula:
Since a claim which “arises out of the transaction or occurrence that is the subject matter of the opposing party’s claim” must be pleaded or is barred, it is important to understand what the quoted phrase means. The United States Supreme Court defined “transaction” as follows:
“‘Transaction’ is a word of flexible meaning. It may comprehend a series of many occurrence[s], depending not so much upon the immediateness of their connection as upon their logical relationship... It is the one circumstance without which neither party would have found it necessary to seek relief. Essential facts alleged by appellant enter into and constitute in part the cause of action set forth in the counterclaim. That they are not precisely identical, or that the counterclaim embraces additional allegations ... does not matter. To hold otherwise would be to rob this branch of the rule of all serviceable meaning, since the facts relied upon by the plaintiff rarely, if ever, are, in all particulars, the same as those constituting the defendant’s counterclaim.” Moore v. New York Cotton Exchange (1926), 270 U.S. 593, 610, 46 S.Ct. 367, 371, 70 L.Ed. 750, 757.
First Bank Missoula, 226 Mont. at 521-22, 737 P.2d at 1136.
¶11 Moreover, in Turtainen v. Poulsen (1990), 243 Mont. 355, 792 P.2d 1089, we stated that even though two lawsuits may require different proof, identical evidence is not required for compulsory counterclaims. Rather, all that is required is that the claims be logically related. Turtainen, 243 Mont. at 359, 792 P.2d at 1092 (citing First Bank, 226 Mont. at 521-22, 737 P.2d at 1136).
*152¶12 Finally, Rule 13, M.R.Civ.R, makes no distinction between legal and equitable counterclaims or suits but only between compulsory and permissive counterclaims. If a defendant’s counterclaim is compulsory it must be pleaded regardless of whether the plaintiff’s suit is legal or equitable in nature, and, if not pleaded, a compulsory counterclaim will be barred. Turtainen, 243 Mont. at 359, 792 P.2d at 1092.
¶13 In Connor v. Zimmerman, Cause No. ADV 96-438, Connor sued to foreclose a construction lien which it claimed against the business premises of Zimmermans and arising out of Connor’s construction contract. Zimmermans’ claims in the case at bar arise out of the construction contract. In fact, Zimmermans’ answer in Connor’s lien foreclosure suit sets up a second affirmative defense and counterclaim as follows:
II.
With respect to the allegations in paragraph V of [Connor’s] complaint, [Zimmermans] allege that the Country Kitchen commercial building sustained serious damage as a result of certain flooding which occurred on July 10,1995, which flooding occurred because of negligence on the part of [Connor]. One of the results of said flooding was that [Connor] and [Zimmermans] did then agree to share some of the effort toward getting the commercial building remodeled and rehabilitated. Prior to the flooding there had been a bid given by [Connor] to [Zimmermans] which [Zimmermans] had accepted. Following the flooding much of the items which were to be furnished by [Connor] were instead furnished by [Zimmermans] and paid for by [Zimmermans],
¶14 Furthermore, in paragraph V of Zimmermans’ second affirmative defense and counterclaim in Connor’s suit, Zimmermans contended that they were damaged as a result of Connor’s negligence and that even without such negligence they had paid all sums owing which Connor’s claimed in his lien foreclosure action.
¶15 Under the circumstances, we conclude that Zimmermans’ claims in the case at bar arise out of the transaction or occurrence that was the subject matter of Connor’s claims in his lien foreclosure action. Moreover, while Zimmermans claim that the two causes of action involve different witnesses, they have failed to demonstrate that the adjudication of their counterclaim against Connor would have required the presence of third parties over whom the court could not acquire jurisdiction. Furthermore, and contrary to Zimmermans’ argu*153ment, the fact that Connor’s claim and Zimmermans’ counterclaim have a different legal basis and require different proof and evidence, does not defeat application of the compulsory counterclaim rule, providing that, as in this case, the claims and counterclaims are logically related because they arise out of a single transaction. First Bank Missoula, 226 Mont. at 522, 737 P.2d at 1136; Turtainen, 243 Mont. at 359, 792 P.2d at 1092. Finally, neither of the exceptions set forth in the final sentence of Rule 13(a), M.R.Civ.P., is applicable here.
¶16 As previously mentioned, the District Court relied on our decision in Julian. While Zimmermans attempt to distinguish the case at bar from the facts oí Julian, we conclude that Julian is persuasive authority for the trial court’s order of dismissal. Our decision in Julian was preceded by our opinion in Mattson v. Julian (1984), 209 Mont. 48, 678 P.2d 654. Mattson arose out of a transaction where a property owner entered into a contract for construction work on his property. Upon completion of the work, the contractor sued the owner for payment on the contract. The owner, however, failed to properly plead a compulsory counterclaim based on his claim of defective work for which he sought recoupment. The trial court refused evidence of the defective workmanship claim since there was no properly pleaded counterclaim. Mattson, 209 Mont. at 53, 678 P.2d at 657. Citing Rule 13(a), M.R.Civ.P, we held that the owner was not entitled to present evidence of defective performance inasmuch as he had not pleaded or otherwise given notice of his defects theory prior to trial by way of a compulsory counterclaim. Mattson, 209 Mont. at 54, 678 P.2d at 657-58.
¶17 Following our decision in Mattson, Julian sued, pleading the same claim that was concluded to be the compulsory counterclaim in Mattson. In affirming the district court’s summary judgment in favor of the defendant/contractor, we stated:
This Court has defined the term transaction as:
‘“that combination of acts and events, circumstances and defaults, which, viewed in one aspect, results in the plaintiff’s right of action, and viewed in another aspect, results in the defendant’s right of action’(Cite omitted.), and it ‘applies to any dealings of the parties resulting in wrong, without regard to whether the wrong be done by violence, neglect or breach of contract.’ ” Scott v. Waggoner (1914), 48 Mont. 536, 545, 139 P. 454, 456.
Julian, 219 Mont. at 148, 710 P.2d at 710.
*154¶18 The instant case is different from Julian only in that Zimmermans did file a counterclaim against Connor but then chose not to pursue their counterclaim in the lien foreclosure suit but, instead, opted to file a second cause of action. Since Zimmermans’ counterclaim was a compulsory counterclaim in Connor’s lien foreclosure action, the effect of Zimmermans’ failure to litigate their counterclaim in that action is res judicata. First Bank Missoula, 226 Mont. at 522-23, 737 P.2d at 1136.
¶19 We conclude that the District Court correctly ruled that Zimmermans’ claim should have been pursued as a mandatory counterclaim in Connor’s foreclosure action and that, thus, their instant cause of action is barred. We hold that the District Court properly dismissed Zimmermans’ complaint.
¶20 Affirmed.
CHIEF JUSTICE TURNAGE, JUSTICES LEAPHART and GRAY concur.