
    James Edward STEVENS; Patricia Macra Stevens, Plaintiffs-Appellants v. BANK OF AMERICA, N.A., Defendant-Appellee.
    No. 14-10050
    Summary Calendar.
    United States Court of Appeals, Fifth Circuit.
    Oct. 1, 2014.
    
      James Edward Stevens, Westlake, TX, pro se.
    Patricia Macra Stevens, Westlake, TX, pro se.
    Richard Dwayne Danner, Litigation Counsel, Nathan Templeton Anderson, Attorney, David Christopher Romness, Mcglinchey Stafford, P.L.L.C., Dallas, TX, Joshua A. Huber, Blank Rome, L.L.P., Houston, TX, for Defendant-Appellee.
    Before PRADO, OWEN, and GRAVES, Circuit Judges.
   PER CURIAM:

Plaintiffs-Appellants James and Patricia Stevens appeal the district court’s dismissal of their quiet-title claim against Bank of America' (BOA), in which they allege that BOA’s mortgage on their home was obtained by fraud. We affirm.

I. FACTUAL AND PROCEDURAL BACKGROUND

In early 2006, the Stevenses obtained a loan secured by a lien on their home on 1816 Broken Bend Drive, Westlake, Texas 76262 (the Property). After, the financial downturn, the Stevenses defaulted on the loan, and BOA sought nonjudicial foreclosure on the Property. Before the foreclosure process was completed, the Stevenses sued BOA and Wells Fargo in Texas state court for damages and injunctive relief to prevent foreclosure. In this action (the First Action), the Stevenses claimed BOA obtained the lien through fraud, violations of the Truth in Lending Act, and predatory lending. BOA removed to federal court, and the district court ultimately dismissed with prejudice for failure to state a claim, pursuant to Federal Rule of Civil Procedure 12(b)(6). See Stevens v. Wells Fargo Bank, N.A., No 4:12-CV-594-A, 2012 WL 5951087, at *1 (N.D.Tex. Nov. 27, 2012).

After BOA successfully foreclosed on the Property, the Stevenses brought this quiet-title action against BOA in Texas state court. BOA again removed to federal court and moved to dismiss the action as barred by res judicata pursuant to Rule 12(b)(6). In their pro se complaint, the Stevenses argued that BOA’s interest in the Property was “obtained by wrongful acts of fraud, fraudulent inducement, concealment and fraudulent misrepresentation.” The district court granted BOA’s motion to dismiss. The Stevenses timely appealed.

II. DISCUSSION

This is an appeal of a final judgment from the district court, and so this Court has jurisdiction pursuant to 28 U.S.C. § 1291. Appellants argue that their quiet-title claim is not barred by res judi-cata because (1) the first judgment is not a decision “on the merits” because it was made prior to discovery and trial; (2) the parties in the two actions are not identical; and (3) the two cases do not involve the same cause of action. We disagree and affirm the district court.

We review de novo the res judicata effect of a prior judgment and a Rule 12(b)(6) dismissal. Bass v. Stryker Corp., 669 F.3d 501 (5th Cir.2012); Test Masters Educ. Servs., Inc. v. Singh, 428 F.3d 559, 571 (5th Cir.2005).

The doctrine of res judicata “ ‘prevents the relitigation of a claim or cause of action that has been finally adjudicated, as well as related matters that, with the use of diligence, should have been litigated in the prior suit.’ ” United States ex rel Laird v. Lockheed Martin Eng’g. & Sci. Servs. Co., 336 F.3d 346, 357 (5th Cir.2003) (quoting Barr v. Resolution Trust Corp., 837 S.W.2d 627, 628 (Tex.1992)), abrogated on other grounds by Rockwell Int’l. Corp. v. United States, 549 U.S. 457, 127 S.Ct. 1397, 167 L.Ed.2d 190 (2007). A judgment precludes a later claim if three elements are met:

(1) there was a prior final judgment on the merits by a court of competent jurisdiction, (2) identity of the parties or those in privity with them exists between the two actions, and (3) the second action is based on the same claims as were raised or could have been raised ■ in the first action.

Id. (citing Amstadt v. U.S. Brass Corp., 919 S.W.2d 644, 652 (Tex.1996)). The Ste-venses argue that the each of these elements is not satisfied. We address each in turn.

A. Prior Final Judgment on the Merits

First, the prior judgment was a “final judgment on the merits by a court of competent jurisdiction.” Id. The Stevens-es do not dispute that the original district court had jurisdiction; rather, they argue that the first judgment, a Rule 12(b)(6) dismissal, was not a final decision on the merits because it was rendered before discovery or trial.

This argument is unavailing because trial and discovery are not necessary to a decision on the merits. Generally, a federal court’s dismissal with prejudice is a final judgment on the merits for res judicata purposes. See Oreck Direct, LLC v. Dyson, Inc., 560 F.Bd 398, 401 (5th Cir.2009) (citing Fernandez-Montes v. Allied Pilots Ass’n, 987 F.2d 278, 284 n. 8 (5th Cir.1993)). It is well established that Rule 12(b)(6) dismissals are made on the merits. Federated Dep’t. Stores, Inc. v. Moitie, 452 U.S. 394, 399 n. 3, 101 S.Ct. 2424, 69 L.Ed.2d 103 (1981) (citing Angel v. Bullington, 330 U.S. 183, 190, 67 S.Ct. 657, 91 L.Ed. 832 (1947)). Thus, the first judgment satisfies this element.

B. Identity of the Parties

Second, both the Stevenses and BOA were parties in the First Action. “In Texas, the identity of parties [element] requires that both parties to the current litigation be parties to the prior litigation or in privity with parties to the prior litigation.” Laird, 336 F.3d at 357 (alteration in original) (quoting Jones v. Sheehan, Young & Culp, P.C., 82 F.3d 1334, 1341 (5th Cir.1996)) (internal quotation marks omitted). The Stevenses argue that this element is not met because BOA “was named as a second junior part of [the First Action] and Wells Fargo Bank ... was the main Defendant.” The fact that BOA was not the first-named defendant in the First Action is immaterial. Both the Stevenses and BOA were parties in the original action, and therefore the district court correctly found this element to be satisfied.

C.Same Cause of Action

Finally, “the second action is based on the same claims as were raised or could have been raised in the first action.” Laird, 336 F.3d at 357 (citing Amstadt, 919 S.W.2d at 652). Texas courts use the transactional test in determining whether two actions involve the same claim. Id. at 358-59 (citing Getty Oil Co. v. Ins. Co. of N. Am., 845 S.W.2d 794, 798 (Tex.1992)). Under this test, the first action bars the second if both arise out of the “same nucleus of operative fact.” Id. at 359 (citing Jones, 82 F.3d at 1342). This is a pragmatic determination, made by “giving weight to whether the facts alleged are related in time, space, origin, or motivation, whether the causes of action form a convenient trial unit, and whether their treatment as a trial unit conforms to the parties’ expectations or business understanding or usage.” Id. (citing Barr, 837 S.W.2d at 631).

The Stevenses argue that this ease involves a different cause of action because it is a postforeclosure quiet-title suit, whereas the First Action was brought pri- or to foreclosure. Although it is true that the foreclosure process had not been completed when the Stevenses brought the First Action, both actions are based on the same operative facts, namely BOA’s allegedly fraudulent procurement of a lien on the Property. Further, the Stevenses do not avoid claim preclusion simply because the current suit is styled as a quiet-title action. See Nguyen v. Bank of Am., N.A., 539 Fed.Appx. 325, 328 (5th Cir.2013) (per curiam) (“[Ajlthough [the appellant] did not assert a quiet-title action in the prior lawsuits, this claim is based on the ‘same nucleus of operative facts,’ concerning the foreclosure of the Property, and therefore could have been previously asserted in the prior lawsuits.”). Thus, we hold that the current action is based on the same claims as the First Action.

III. CONCLUSION

For the foregoing reasons, we AFFIRM. 
      
       Pursuant to 5th Cir. R. 47.5, the court has determined that this opinion should not be published and is not precedent except under the limited circumstances set forth in 5th Cir. R. 47.5.4.
     
      
      . In addition,, the Stevenses argue that they have plead sufficient facts to meet the standards laid out in Bell Atlantic Corp. v. Twombly, 550 U.S. 544, 127 S.Ct. 1955, 167 L.Ed.2d 929 (2007). Because we affirm the district court's dismissal on res judicata grounds, we do not reach this issue.
     
      
      . This Court applies federal common law to determine "the claim-preclusive effect of a dismissal by a federal court sitting in diversity.” Semtek Int’l, Inc. v. Lockheed Martin Corp., 531 U.S. 497, 508, 121 S.Ct. 1021, 149 L.Ed.2d 32 (2001). Under federal common law, we apply "the [preclusion] law of the forum state unless the state law is incompatible with federal interests.” Am. Home Assurance Co. v. Chevron, USA, Inc., 400 F.3d 265, 271 n. 20 (5th Cir.2005) (citing Semtek, 531 U.S. at 508, 121 S.Ct. 1021). The parties do not address this choice-of-law issue. The Ste-venses apply Texas law and BOA applies federal law. Because we reach the same conclusion regardless of whether Texas or federal preclusion law applies, we need not decide whether Texas law is incompatible with federal interests in this case. Compare Laird, 336 F.3d at 357-60 (applying Texas preclusion law), with Test Masters, 428 F.3d at 570-75 (applying federal preclusion law).
     