I do not believe that the trial court had jurisdiction to issue the order challenged in this mandamus petition; I would grant the writ and order that the underlying case be dismissed. Therefore, I respectfully dissent.
On August 26, 2016, the Town of Hayneville ("the Town") held an election for the positions of mayor and five town council members. Roy Meadows, Lula Tyson-Bailey, and Kim Payton won the majority of votes for their council seats in District A. Meadows was disqualified from office soon *646after the election, and his seat was vacated.8
On November 3, 2016, Darshini Bandy, Connie Johnson, and Justin Pouncey (hereinafter referred to collectively as "the electors") filed an action in the Lowndes Circuit Court against the members of the town council and the mayor of the town, David Daniel, who also sits as a council member. They alleged that Tyson-Bailey had won her seat and that the council had failed to comply with Ala. Code 1975, § 11-46-55(a), which required it to determine the winning candidate for that election and certify the election results. They thus sought a judgment declaring that Tyson-Bailey was the winner and that she should be issued a certificate of election. This action was assigned case no. CV-16-13.
On January 5, 2017, the trial court issued an order holding that the council had failed to perform its ministerial duties under § 11-46-55(a) ; it further declared that Tyson-Bailey and Payton9 had been elected, declared them members of the council, and declared that they be sworn into office. Although the trial court held that the council had failed to comply with § 11-46-55(a), its order contained no direction for future compliance with various election laws. The trial court reserved authority to enforce its order.
The January 5 judgment, for all that appears, was a final judgment. A final judgment is one that conclusively determines the issues before the court and ascertains and declares the rights of the parties involved. George v. Sims, 888 So.2d 1224, 1226 (Ala. 2004). After 30 days, a court generally loses jurisdiction to amend its judgment unless a timely motion under Rule 59, Ala. R. Civ. P., has been filed. Ex parte Caremark Rx, LLC, 229 So.3d 751, 757 (Ala. 2017). A trial court does, however, retain "residual jurisdiction" to enforce its judgment. George, 888 So.2d at 1227. Such residual jurisdiction to enforce a judgment does not allow the trial court to modify or to amend the judgment substantively:
"Although a trial court has 'residual jurisdiction or authority to take certain actions necessary to enforce or interpret a final judgment,' that authority is not so broad as to allow substantive modification of an otherwise effective and unambiguous final order."
George, 888 So.2d at 1227 (quoting Helms v. Helms' Kennels, Inc., 646 So.2d 1343, 1347 (Ala. 1994) ). See also Gulf Beach Hotel, Inc. v. Gulf State Park Auth., 58 So.3d 727, 732 (Ala. 2010) (holding that, although a trial court retains "residual jurisdiction to enforce its judgment," if the judgment is final, the court has "no authority to consider new claims"). Further, a trial court generally cannot purport to "retain" jurisdiction to allow it to revisit a judgment or to impose new obligations. See Ex parte Caremark, 229 So.3d at 760 ("The jurisdiction retained by the trial court after it entered its final judgment ... is limited to interpreting or enforcing that final judgment; the trial court could not extend its jurisdiction over any matter somehow related to the ... final judgment in perpetuity by simply declaring it so."). See also Gulf Beach Hotel, 58 So.3d at 731 *647(rejecting the argument that, because the trial court expressly retained jurisdiction to enforce its final judgment, it possessed jurisdiction to consider amendments to the complaint). With no Rule 59 motion filed in the case-nothing before us, in argument or otherwise, indicates that such a motion was filed-the trial court lost jurisdiction in the case except to enforce its final judgment. It retained no power to revisit that judgment, to modify it substantively, to impose new obligations, or to extend its jurisdiction. Ex parte Caremark, supra, and Gulf Beach Hotel, supra.
On February 6, 2017, the Lowndes County Probate Court set a special election to fill the seat vacated as a result of the Meadows election contest. The probate court's order also specified that Bell and Scrushy-the prior District A candidates and the plaintiffs in the election contest that resulted in Meadows's disqualification-were to be the candidates for that seat. Pouncey, one of the plaintiffs in case no. CV-16-13, attempted to file a candidacy application; however, the Town clerk apparently refused his application, stating that it was not allowed under the probate court's special-election order.
In response, Pouncey filed in case no. CV-16-13 a "motion for enforcement of the court's prior order(s)." In it, he alleged that the probate court had improperly restricted the names of the candidates on the ballot for the special election. He sought an order directing the Town to accept him as a candidate and to postpone the election. The motion alleged that the "[p]laintiffs" had "previously paid the cost of the original action." This motion can only be interpreted as an attempt to invoke enforcement of the trial court's January 5 judgment in that case.
On March 17, 2017, the trial court issued an order holding that the probate court had not set the special election on the date specified by statute. It therefore ordered that the special election be rescheduled. It further ordered that the Town conduct the election as required by law and struck the portion of the probate court's order specifying that only Bell and Scrushy could be shown as candidates. This order is wholly outside the scope and subject matter of the January 5 final judgment in case no. CV-16-13.
The special election was held on May 23, 2017. Scrushy received the most votes. On May 26, 2017, the electors filed in case no. CV-16-13 a "second motion to enforce prior orders in this matter." They challenged the May 23 special election, arguing that it was not conducted in a manner required by law. Specifically, they argued that because the council had not had a quorum in a meeting that year, the "municipal governing body" thus could not have ordered the election as required by Ala. Code 1975, § 11-46-21(b).10
The Town responded with a "motion for enforcement of court's prior orders," which contended that certain council members had failed to attend council meetings, thus preventing the council from having a quorum to certify the results of the May 23 special election.11 The Town then filed a motion to dismiss, arguing that the trial court had no jurisdiction over the special election because no election-contest action *648had been filed pursuant to the requirements of Ala. Code 1975, § 17-16-56.
On July 7, 2017, the trial court issued an order in response to the electors' "second motion to enforce prior orders," the Town's "motion for enforcement of court's prior orders," and the Town's motion to dismiss. It found that the mayor and Payton had failed to attend council meetings and, owing to a lack of a quorum, had thus prevented the council from taking any action. Further, the mayor's inaction prevented the council from properly calling the May 23 special election. The trial court thus voided the special election and further ordered the mayor and every council member to "meet as a town council" at a certain time "and conduct such business as the council chooses." Any council member who was missing from the meeting would be sanctioned by the trial court. The Town and Scrushy petitioned for mandamus review, contending that the trial court should have granted the Town's motion to dismiss because it lacked jurisdiction to vacate the special election.
It appears that after the January 5 final judgment in case no. CV-16-13, the trial court lacked jurisdiction to issue any of its subsequent orders in that case. The underlying action involved a challenge to the council's failure to certify the election of Tyson-Bailey and Payton, and those claims were fully resolved in the January 5 judgment. Nevertheless, the trial court in case no. CV-16-13 purported to subsequently adjudicate issues related to the vacancy in Meadows's seat, even though that was the subject matter of a different lawsuit between different parties that had already been concluded. See note 8, supra. Specifically, in this case, Pouncey's challenge to the probate court's order for the special election strikes me as requiring an entirely new lawsuit, and not the reopening of a case against the council. Modifying the date of the special election and the candidate list is not enforcement of the January 5 judgment; it is instead adding to or modifying that judgment in a substantive way that is forbidden by this Court's decision in George, supra. Pouncey's subsequent request for the trial court to "enforce" its orders by voiding the special election is similarly relief far beyond simply enforcing the January 5 judgment.
None of the orders addressed above in case no. CV-16-13 issued after the final judgment of January 5 appear in any way related to simply interpreting or enforcing that judgment. They are instead taking jurisdiction over new substantive claims and adjudicating separate challenges. The trial court had no residual or retained jurisdiction to issue those orders.
This is not the jurisdictional issue Scrushy and the Town raise in their mandamus petition. However, this Court may, in considering a mandamus petition, ex mero motu address the lack of jurisdiction, even if that issue is not raised. Ex parte Progressive Specialty Ins. Co., 31 So.3d 661, 663 n.2 (Ala. 2009) ("Although Progressive does not raise in its petition the precise jurisdictional issue we address, the ' "[l]ack of subject matter jurisdiction may not be waived by the parties and it is the duty of an appellate court to consider lack of subject matter jurisdiction ex mero motu." ' " (quoting Ex parte Berry, 999 So.2d 883, 888 (Ala. 2008), quoting in turn Ex parte Smith, 438 So.2d 766, 768 (Ala. 1983) ) ). See also Ex parte T.C., 63 So.3d 627, 630 (Ala. Civ. App. 2010), superseded on other grounds by statute, as recognized in Ex parte F.T.G., 199 So.3d 82, 86 (Ala. Civ. App. 2015) ("[O]ur review of such questions [regarding the lack of subject-matter jurisdiction] is not limited to grounds specifically raised in a mandamus petition because a lack of subject-matter jurisdiction is not subject to waiver by the *649parties, and it is our duty to consider a lack of subject-matter jurisdiction ex mero motu."). I would grant the petition and issue the writ.
Rickey Bell and Carol Scrushy filed in the Lowndes Circuit Court a contest challenging Meadows's election. That action was assigned case no. CV-16-9. The final judgment in that case was entered on September 13, 2016. For all that appears, no other activity took place in that case.
The initial complaint did not include allegations regarding Payton; it is unclear from the materials provided to this Court whether it was later amended to include allegations regarding Payton.
This Code section states: "Special elections shall be held on the second or fourth Tuesday of any month when ordered by the municipal governing body...." It was argued that because the council did not meet and call the special election, it was not "ordered by the municipal governing body."
It does not appear from the materials before us that the Town was a party in case no. CV-16-13. However, it had previously appeared in the case in some unexplained capacity.