OPINION H&S Hoke Ranch, LLC seeks a writ of mandamus compelling the trial court to set aside an order denying its plea to the jurisdiction and motion to transfer pursuant to Section 21.002 of the Property Code. See TEX. PROP. CODE ANN. § 21.002. We will conditionally grant mandamus relief. Breviloba, LLC instituted an action for condemnation in the county court at law because it was seeking to build a pipeline across Hoke Ranch’s property. The action became judicial in nature when Hoke Ranch filed its objections to the award granted by the commissioners. See TEX. PROP. CODE ANN. § 21.018. During the proceedings, Hoke Ranch also filed counterclaims against Breviloba independent of its challenge to the condemnation award asserting damages in excess of $13 million including a claim for trespass with a resulting remedy of ownership for the portion of the pipeline built on Hoke Ranch’s property of $4,018,523.[1] Hoke Ranch’s plea to the jurisdiction and motion to transfer alleged that because the amount in controversy for its counterclaims exceed the county court at law’s jurisdictional limit, the case should be transferred in its entirety to the district court. Breviloba does not dispute that the counterclaims seek damages in amounts that exceed the jurisdiction of the county court at law but contends that the county court at law has jurisdiction over the counterclaims as part and parcel of the eminent domain proceeding. Breviloba also contends that mandamus is not the appropriate mechanism for Hoke Ranch to challenge the denial of the plea to the jurisdiction and motion to transfer. Mandamus is an extraordinary remedy and is warranted only when the trial court clearly abused its discretion and the relator has no other adequate remedy. In re Murrin Bros. 1885, Ltd., 603 S.W.3d 53, 56-57 (Tex. 2019) (orig. proceeding). In order to establish its right to a writ of mandamus, Hoke Ranch has the burden to prove both of these requirements. In re H.E.B. Grocery Co., 492 S.W.3d 300, 302 (Tex. 2016) (orig. proceeding) (per curiam). A trial court abuses its discretion when its ruling is arbitrary and unreasonable or is made without regard for guiding legal principles or supporting evidence. In re Nationwide Ins. Co. of Am., 494 S.W.3d 708, 712 (Tex. 2016) (orig. proceeding). “Similarly, a trial court abuses its discretion when it fails to analyze or apply the law correctly.” Id.; see also In re Prudential Ins. Co. of Am., 148 S.W.3d 124, 135 (Tex. 2004) (orig. proceeding) (“[A] trial court has no ‘discretion’ in determining what the law is or applying the law to the facts.” (quoting Walker v. Packer, 827 S.W.2d 833, 840 (Tex. 1992) (orig. proceeding))). Subject-matter jurisdiction is essential to the authority of a court to decide a case. Bland Indep. Sch. Dist. v. Blue, 34 S.W.3d 547, 553-54 (Tex. 2000); see also In re United Servs. Auto. Ass’n, 307 S.W.3d 299, 309 (Tex. 2010) (“A judgment is void if rendered by a court without subject matter jurisdiction.”). Subject-matter jurisdiction cannot be waived and may be raised at any point during the proceeding. Rusk State Hosp. v. Black, 392 S.W.3d 88, 103 (Tex. 2012). Whether subject-matter jurisdiction exists is a question of law that we review de novo. City of Houston v. Rhule, 417 S.W.3d 440, 442 (Tex. 2013) (per curiam). “If an eminent domain case is pending in a county court at law and the court determines that the case involves an issue of title or any other matter that cannot be fully adjudicated in that court, the judge shall transfer the case to a district court.” TEX. PROP. CODE ANN. §21.002. Hoke Ranch argues that because its counterclaims implicate ownership and exceed the court’s jurisdictional limits, the counterclaims are a “matter that cannot be fully adjudicated in that court.” We agree. Counterclaims, whether permissive or compulsory, must be within the trial court’s jurisdiction. Smith v. Clary Corp., 917 S.W.2d 796, 798 (Tex. 1996) (per curiam). A counterclaim is not within the trial court’s subject matter jurisdiction when the amount in controversy exceeds the maximum jurisdictional limit of the court. Smith, 917 S.W.2d at 798. Generally, a trial court does not lose jurisdiction over a plaintiff’s claim that is properly within its jurisdictional limits simply because a defendant files a counterclaim that exceeds the court’s jurisdictional limits. See Thomas v. Long, 207 S.W.3d 334, 338 (Tex. 2006) (“[I]t is proper for a trial court to dismiss claims over which it does not have subject matter jurisdiction but retain claims in the same case over which it has jurisdiction.”). However, in this circumstance where the counterclaims cannot be fully adjudicated by the county court at law, the Property Code requires a different procedure; that is, the county court at law is statutorily required to transfer the case to the district court, which has concurrent jurisdiction of eminent domain proceedings with the county court at law and also has jurisdiction of counterclaims over which the county court at law does not. See TEX. PROP. CODE ANN. § 21.002; see also In re Riley, 339 S.W.3d 216, 221 (Tex. App.— Waco 2011). Breviloba argues that Hoke Ranch has not established that it has no adequate remedy by appeal and thus mandamus is inappropriate. “The adequacy of an appellate remedy must be determined by balancing the benefits of mandamus review against the detriments.” In re Team Rocket, L.P., 256 S.W.3d 257, 262 (Tex. 2008) (citing In re Prudential Ins. Co. of Am., 148 S.W.3d 124, 136 (Tex. 2004)). Balancing these interests, it has been held that “mandamus relief is appropriate to ‘spare private parties and the public the time and money utterly wasted enduring eventual reversal of improperly conducted proceedings.’” In re John G. & Marie Stella Kenedy Mem’l Found., 315 S.W.3d 519, 523 (Tex. 2010) (quoting In re Prudential, 148 S.W.3d at 136). We have previously held that Property Code Section 21.002′s transfer provision is mandatory. See In re Riley, 339 S.W.3d at 221. Having concluded that the county court at law in which the case is pending does not have subject matter jurisdiction over Hoke Ranch’s counterclaims because Hoke Ranch alleges an amount in controversy in excess of the jurisdictional limits of the county court at law, mandamus relief is appropriate to spare the parties and the public the time and money spent on fatally flawed proceedings in the county court at law. Therefore, we conditionally grant mandamus relief and direct the trial court to vacate its order denying Hoke Ranch’s plea to the jurisdiction and motion to transfer signed by the trial court on August 17, 2020 and to grant the plea to the jurisdiction and motion to transfer the case to the district court within twenty-one days of this opinion. A writ will issue only if the trial court fails to act in accordance with this opinion. The order granting the emergency stay entered by this Court on September 9, 2020 is hereby lifted. TOM GRAY Chief Justice Before Chief Justice Gray, Justice Neill, and Visiting Justice Rose[2] (Justice Neill dissenting) Petition conditionally granted Opinion delivered and filed May 28, 2021 [OTO6]