In this long-running dispute between co-owners of a pipeline, the court of appeals held that the petitioner’s breach-of-contract claim is an impermissible collateral attack on the judgment in an earlier foreclosure suit involving the same parties. We disagree. Although the two cases are closely related, the judgment in the foreclosure litigation did not necessarily decide the contractual dispute raised in this litigation. On top of that, the petitioner attempted to litigate its contractual claim in the earlier foreclosure suit, but the respondent successfully convinced the foreclosure court that it lacked jurisdiction over the contract claim. Under these circumstances, litigation of the contract claim in a later suit is not barred. The judgment of the court of appeals is reversed, and the case is remanded to that court for further proceedings. In 2011, WBH Energy and U.S. Energy Development entered a joint operating agreement to develop oil and gas leases in Montague County. Each had a 50% interest and was to pay 50% of the costs, including costs related to construction of a pipeline. WBH defaulted on its $413,000 share of the pipeline costs in 2014. The construction company filed a mineral contractor lien on the pipeline under Chapter 56 of the Property Code. CL III Funding, the respondent in this Court, acquired WBH’s 50% interest through bankruptcy in 2015. Later that year, U.S. Energy assigned its 50% interest to Strategic Energy, which created Steelhead Midstream Partners to operate the project.We will refer to the respondent as “CL III” and to the multiple, aligned petitioners collectively as “Steelhead.” CL III and Steelhead executed another joint operating agreement, which again stated that each owner had a 50% interest in the pipeline and each was responsible for 50% of the costs. The pipeline remained subject to the construction company’s lien. In 2016, CL III paid $350,000 to the construction company in exchange for the right to assert the construction company’s lien against the pipeline. Thus, at this point, CL III owned both 50% of the pipeline and the right to foreclose on its own pipeline. CL III then filed a foreclosure suit in Montague County, by which it sought to force its co-owner, Steelhead, to pay off the construction debt now owed to CL III. Steelhead responded with a counterclaim asserting that CL III breached the joint operating agreement by failing to pay its share of the construction costs that gave rise to the lien. In Steelhead’s view, CL III owed the remaining construction debt, which it inherited from WBH, and it could not collect that debt from Steelhead, whose predecessor had already paid its share of the construction debt. CL III sought dismissal of Steelhead’s breach-of-contract counterclaim for lack of jurisdiction because Steelhead had already submitted the claim to a federal court in the separate bankruptcy proceeding. The Montague County trial court agreed with CL III and dismissed Steelhead’s breach-of-contract counterclaim with prejudice for lack of jurisdiction. The court then issued an order holding that CL III held a valid and perfected lien encumbering Steelhead’s 50% interest in the pipeline. The court rendered final judgment to that effect and directed a foreclosure sale of Steelhead’s 50% interest in the pipeline. To avoid foreclosure, Steelhead paid the judgment of over $400,000. Steelhead did not appeal. Steelhead filed this lawsuit in Tarrant County (under the JOA’s forum selection clause) against CL III in August 2017, before final judgment in the Montague County foreclosure case. Steelhead brought a single claim: breach of contract (the joint operating agreement) based on CL III’s failure to pay its alleged portion of the debt, which resulted in the subsequent foreclosure on Steelhead’s 50% interest. After a bench trial, Steelhead prevailed and won a judgment of approximately $2 million against CL III. On appeal, CL III argued that Steelhead “litigated—and lost— the prior Montague Lawsuit declaring CL III’s lien claims valid and enforceable. . . . Nevertheless, in a true collateral attack, [Steelhead] maintained this second Tarrant Lawsuit for breach of the Montague Agreement . . . .” (Emphasis added). The court of appeals agreed. 655 S.W.3d 844, 864 (Tex. App.—Fort Worth 2022). It reasoned that the Montague County foreclosure suit necessarily determined the status of the debt and the parties’ rights under the joint operating agreement because CL III could not foreclose without proving it was owed the debt. Id. As a result, Because [Steelhead's] breach of contract action is premised on CL’s “sole,” “individual[]” liability for the [construction] debt, the breach of contract action is an attempt to collaterally attack the foreclosure judgment and avoid its binding, legal effect. We agree with CL that this is an impermissible collateral attack. Id. (emphasis added). The court of appeals reversed and rendered a take-nothing judgment for CL III. Id. Steelhead petitioned for review. In this Court, CL III embraces the court of appeals’ view that a judgment in its favor in the Montague County case necessarily foreclosed Steelhead’s breach-of-contract claim, which now amounts to a collateral attack on the Montague County judgment. CL III argues as follows: The Montague Judgment decided far more than mere lien perfection status. Chiefly, it determined that CL III did not solely owe the [construction] debt. If CL III had owed the debt, it could not have foreclosed (a complete merits-based defense). Both parties litigated that material issue, and the Montague Judgment ruled in CL III’s favor. Although [Steelhead's] Tarrant Lawsuit later sought relief sounding in contract, the second action was again premised on CL III’s alleged status as the sole debtor and lack of authority to foreclose. That material issue cannot be re-litigated in a second action. This argument overreads the effect of the judgment in the Montague County foreclosure case. We can assume, as CL III contends, that the Montague County judgment necessarily decided that CL III did not solely owe the construction debt underlying the lien. It may nevertheless be the case, as Steelhead asserts, that CL III owes a separate contractual debt to Steelhead. Asking which of two parties owes a particular debt, to whom it is owed, and whether a lien securing the debt is enforceable, is conceptually distinct from asking whether the two parties have a JOA under which they have separately agreed, quite apart from the debt or the resulting lien, to share all expenses as between themselves. Whether the construction debt was owed by Steelhead is primarily a question about the parties’ obligations to the construction company under the agreements giving rise to that debt. Similarly, whether the debt was owed to CL III is primarily a question about the agreements by which CL III acquired the debt. Whether CL III has a separate obligation under the JOA—rather than under the debt instruments or the lien—to pay some amount to Steelhead after the foreclosure litigation to settle the parties’ accounts under their JOA is not a question the foreclosure judgment necessarily decided. In other words, even if the foreclosure judgment is fully correct and binding with respect to the matters it covers, it may still be true that CL III has breached its agreement with Steelhead by acquiring the lien and using the foreclosure litigation to avoid its obligations under the JOA. Properly understood, Steelhead’s Tarrant County lawsuit seeks to establish not that the result of the foreclosure litigation was incorrect, but that the result of the foreclosure litigation triggers contractual obligations CL III owes to Steelhead. These issues are closely related, to be sure, but they are not so tightly tethered that the resolution of one necessarily decides the other. CL III is therefore incorrect that the judgment in the Montague County case necessarily foreclosed Steelhead’s related breach-of-contract claim. Nor did the judgment purport, on its face, to do so. Quite the opposite. The judgment decreed in relevant part that “the Subject Lien is a valid and perfected mineral contractor lien under Chapter 56 of the Texas Property Code in the amount of $413,030.00.” Neither the judgment nor any of the court’s other statements commented on the status of contractual obligations between Steelhead and CL III. In fact, CL III’s motion for summary judgment expressly asked the court to focus on the validity of the lien CL III acquired from the construction company and not to consider the related issue of how CL III and Steelhead had contractually allocated their various obligations as between themselves. The motion states that it “focus[es] exclusively on validity and scope of the [construction] lien,” that Steelhead’s counterclaims (including its counterclaim for breach of contract) “do not impact the issues presented in this motion,” and that the trial court lacked jurisdiction to hear the counterclaims. Ideally, of course, all these related matters would have been litigated at once. The familiar rule of res judicata prohibits follow-on litigation of claims that were or could have been decided in a prior action. Rosetta Res. Operating, LP v. Martin, 645 S.W.3d 212, 225 (Tex. 2022). Steelhead, however, attempted to avoid duplicative litigation by bringing its breach-of-contract claim as a counterclaim in the Montague County foreclosure suit. CL III responded by convincing the court that it lacked authority to decide Steelhead’s counterclaims because of related bankruptcy proceedings. Having argued successfully that the Montague County court lacked the power to decide the foreclosure claim and the contract claim at the same time, CL III is hardly in a strong position to now contend that the contract claim is forever barred because it was not litigated at the same time as the foreclosure claim. As we recently observed, “[i]t is neither a punishment nor unfair to hold a party to its prior position when the first court adopted that position and, because of that adoption, the party obtained the result it sought.” Fleming v. Wilson, 694 S.W.3d 186, 193 (Tex. 2024). For these reasons, the court of appeals erred by concluding that Steelhead’s breach-of-contract claim is an impermissible collateral attack on the judgment in the Montague County suit. CL III raised other grounds for reversal that the court of appeals did not reach. Therefore, without hearing oral argument, see TEX. R. APP. P. 59.1, we grant the petition for review, reverse the court of appeals’ judgment, and remand to the court of appeals for further proceedings consistent with this opinion. OPINION DELIVERED: December 31, 2024