Appellants Roger Koeppe (“Koeppe”) and Improvements Inside and Out, Inc. (“IIO”), appeal from the trial court’s summary judgment in favor of Defendant Perry Electrical Constructors, LLC d/b/a Conroe Empire Electric (“Perry Electrical”). Because res judicata does not apply to a nonsuit dismissing claims without prejudice, we reverse the trial court’s summary judgment and remand to the trial court for further proceedings. Background In 2019, Perry Electrical was formed by its two members, WCP 2016 Trust and IIO. Will C. Perry, as Trustee, signed on behalf of WCP 2016 Trust, and Roger K. Koeppe, as Director/President and Chairman, signed on behalf of IIO. As a result of the company formation, Koeppe owned ten percent of Perry Electrical and was retained as Chief Financial Officer for Perry Electrical to handle financial and accounting matters, among other duties. Perry Electrical filed suit against Koeppe and IIO for breach of contract, common law civil conversion, theft, unjust enrichment, and conspiracy. Perry Electrical also sued Koeppe for breach of fiduciary duty, fraud, and negligence. Perry Electrical alleged that Koeppe defrauded Perry Electrical when he entered into a recruiting agreement with WeConnect Recruiting Services (“WeConnect”) to fill a position for Perry Electrical and wrongfully retained $7,500 in recruiting fees. Perry Electrical pleaded that based on Koeppe’s alleged deceit, Koeppe was terminated from Perry Electrical in September 2020. Following his termination, Koeppe delivered to Perry Electrical eight invoices that totaled over $83,000 that he claimed were still owed for work he had completed. According to the Perry Electrical’s Second Amended Petition, the invoices were in the name of Emerald Sands Investment Company (“Emerald Sands”) and were dated during a period in which Koeppe had invoiced and been paid more than $93,000 by Perry Electrical. In response, Koeppe, IIO, and Emerald Sands filed a general denial, and Emerald Sands, identified in the filing as an assumed name of Koeppe, counterclaimed against Perry Electrical for breach of contract for unpaid materials, services, and expenses. Koeppe also filed a third-party petition alleging fraud against Karen Sable, the principal owner of WeConnect. In December 2021, Perry Electrical filed a No-Evidence Motion for Partial Summary Judgment Against Defendant and Counter-Plaintiff, Emerald Sands Investment Company, arguing that Emerald Sands was not a legal entity capable of bringing a suit in a Texas court. After the trial court granted the No-Evidence Motion for Partial Summary Judgment, Perry Electrical voluntarily nonsuited all its claims without prejudice by filing a Notice of Nonsuit. The trial court signed the Order of Nonsuit, dismissing “the entire case and all claims asserted by any party therein.” In March 2022, Koeppe and IIO filed suit against Perry Electrical for conversion and breach of contract based on Perry Electrical’s failure to pay money received, goods, and services that Koeppe and IIO were owed. In its answer, Perry Electrical asserted affirmative defenses, including res judicata/claim preclusion. Perry Electrical filed a Traditional Motion for Summary Judgment based on its affirmative defense of res judicata/claim preclusion, arguing that all of Koeppe’s and IIO’s claims were barred because they were finally disposed of by summary judgment in the prior litigation. Koeppe and IIO filed a Response to Perry Electrical’s Motion for Summary Judgment, arguing that the trial court’s previous Order of Nonsuit and Order Granting No-Evidence Motion for Partial Summary Judgment only applied to Emerald Sands. In their Response, Koeppe and IIO stated that Koeppe is the President and sole owner of IIO. The record shows that Koeppe and IIO also stated that Emerald Sands is an assumed name of Koeppe. Perry Electrical filed a Reply to Koeppe’s and IIO’s Response to its Motion for Summary Judgment and argued that it was clear that they had a chance to adjudicate their claims, summary judgment was granted, and their claims are precluded. In May 2022, the trial court granted Perry Electrical’s Traditional Motion for Summary Judgment and dismissed all claims against Perry Electrical. Koeppe and IIO filed a Motion for New Trial and argued that the claims for breach of contract and conversion had not been brought against Perry Electrical. The motion was overruled by operation of law when the trial court did not rule on the motion within seventy-five days after judgment. See Tex. R. Civ. P. 329b(c). Koeppe and IIO appealed the trial court’s order granting summary judgment based on Perry Electrical’s claim of res judicata. Standard of Review We review summary judgment orders de novo. Provident Life & Accident Ins. Co. v. Knott, 128 S.W.3d 211, 215 (Tex. 2003). The party moving for traditional summary judgment must establish that (1) no genuine issue of fact exists, and (2) it is entitled to judgment as a matter of law. Tex. R. Civ. P. 166a(c); Randall’s Food Mkts., Inc. v. Johnson, 891 S.W.2d 640, 644 (Tex. 1995). If the moving party produces evidence entitling it to summary judgment, the burden shifts to the non- movant to present evidence that raises a fact issue. Walker v. Harris, 924 S.W.2d 375, 377 (Tex. 1996). In determining whether there is a disputed material fact issue precluding summary judgment, evidence favorable to the nonmovant will be taken as true. Nixon v. Mr. Prop. Mgmt. Co., 690 S.W.2d 546, 548-49 (Tex. 1985). We review the summary judgment record “in the light most favorable to the nonmovant, indulging every reasonable inference and resolving any doubts against the motion.” City of Keller v. Wilson, 168 S.W.3d 802, 824 (Tex. 2005); see also Mosaic Baybrook One, L.P. v. Simien, 674 S.W.3d 234, 252 (Tex. 2023) (citation omitted). Analysis In their sole issue, Koeppe and IIO argue that their claims are not barred by res judicata/issue preclusion for several reasons. According to Koeppe and IIO, res judicata does not apply here because the claims brought were not compulsory counterclaims, the dismissal based on lack of standing is not a judgment on the merits and cannot support res judicata, and the claims brought against Perry Electrical are not transactionally related to those brought in the prior suit. Koeppe and IIO argue that being defendants in the prior suit brought by Perry Electrical alone does not bar the claims in their later suit, unless their claims qualified as compulsory counterclaims. Koeppe and IIO argue that the claims do not qualify as compulsory counterclaims because the claims are contractual and did not arise from the same transaction that was the subject matter of the prior suit, and the trial court did not render a judgment on the merits of Koeppe’s and IIO’s claims in the prior suit. Perry Electrical argues that the claims were properly dismissed and res judicata was properly applied because Koeppe’s and IIO’s claims were compulsory counterclaims in the prior suit and judgment was rendered on the merits. In its Traditional Motion for Summary Judgment, Perry Electrical argued that res judicata precluded Koeppe and IIO from bringing their claims of conversion and breach of contract because Koeppe’s and IIO’s counterclaim in the prior suit included “the same claim for the same timeframe[.]” Perry Electrical argues that those claims were the subject of its Motion for Summary Judgment and Nonsuit which fully dismissed all claims by all parties. “Res judicata bars relitigation of claims that have been finally adjudicated or that could have been litigated in [a] prior action. Igal v. Brightstar Info. Tech. Grp., Inc., 250 S.W.3d 78, 86 (Tex. 2008), superseded by statute as recognized in Prairie View A&M Univ. v. Chatha, 381 S.W.3d 500, 518 (Tex. 2012). The policies behind res judicata “reflect the need to bring all litigation to an end, prevent vexatious litigation, maintain stability of court decisions, promote judicial economy, and prevent double recovery.” Barr v. Resolution Tr. Corp., 837 S.W.2d 627, 629 (Tex. 1992). We have recognized the “fundamental rule that it is the purpose of the law to put an end to litigation and expedite the administration of justice.” Engelman Irrigation District v. Shields Bros., Inc., 514 S.W.3d 746, 749 (Tex. 2017) (citing Stanolind Oil & Gas Co. v. State, 145 S.W.2d 569, 570 (Tex. 1940)). To establish the affirmative defense of res judicata, the party must provide proof of (1) a prior final determination on the merits by a court of competent jurisdiction; (2) identity of parties or those in privity with them; and (3) a second action based on the same claims as those that were or could have been raised in the first action. Eagle Oil & Gas Co. v. TRO-X, L.P., 619 S.W.3d 699, 705-06 (Tex. 2021). The burden of proving each element of the defense rests with the party asserting the affirmative defense of res judicata. Tex. R. Civ. P. 94; Eagle Oil & Gas Co., 619 S.W.3d at 706. As the party raising res judicata as an affirmative defense, Perry Electrical had the burden to prove each element of its defense. See Tex. R. Civ. P. 94; Eagle Oil & Gas Co., 619 S.W.3d at 706. First, Perry Electrical was required to demonstrate that a court rendered a final determination on the merits of the case, and they cannot do so. See Eagle Oil & Gas Co., 619 S.W.3d at 706. Perry filed a No-Evidence Motion for Partial Summary Judgment against Emerald Sands in the prior lawsuit, and the trial court granted the motion in favor of Perry Electrical and dismissed Emerald Sand’s claims against Perry Electrical. However, Emerald Sands is not a party to the suit made the basis of this appeal. And once the summary judgment was granted, Perry Electrical then filed a Notice of Nonsuit as to all parties and the trial court granted the nonsuit and dismissed the entire case and all claims asserted by any party. But a nonsuit is not a final judgment on the merits, and res judicata does not apply. Epps v. Fowler, 351 S.W.3d 862, 868-69 (Tex. 2011) (citing Klein v. Dooley, 949 S.W.2d307, 307 (Tex. 1997)) (explaining that res judicata has not occurred if a party or suit is dismissed without prejudice, or if plaintiff takes voluntary nonsuit). Without a final judgment rendered on the merits of the prior suit, Perry Electrical cannot establish the affirmative defense of res judicata. See Eagle Oil & Gas Co., 619 S.W.3d at 705-06; Epps, 351 S.W.3d at 868-69. Because no judgment on the merits was rendered in the prior suit, we conclude the trial court erred by granting Perry Electrical’s Traditional Motion for Summary Judgment. We sustain Koeppe’s and IIO’s sole issue, reverse the trial court’s summary judgment granting Perry Electrical’s Traditional Motion for Summary Judgment, and remand for further proceedings consistent with this opinion. REVERSED AND REMANDED. JAY WRIGHT Justice Submitted on March 5, 2024 Opinion Delivered September 26, 2024 Before Golemon, C.J., Johnson and Wright, JJ.