
999 So.2d 953 (2008)
Larry OWEN and Judith Owen
v.
Marvin L. HOPPER et al.
2070016.
Court of Civil Appeals of Alabama.
May 23, 2008.
Rehearing Denied July 11, 2008.
Robert Straub of Russell, Straub & Kyle, Decatur, for appellants.
*954 Sherman B. Powell, Jr., Decatur, for appellees.
THOMPSON, Presiding Judge.
Larry Owen and Judith Owen ("the Owens") own real property in Morgan County. The Owens' property shares a common boundary with real property owned by Marvin L. Hopper and Ruth Hopper ("the Hoppers"). The Owens' property also shares a common boundary with real property owned by Aulton N. Stewart and Mary S. Stewart ("the Stewarts"). The southern boundary of the Owens' property is the southern boundary of Section 10, Township 7 South, Range 3 in Morgan County. Section 10 is immediately north of Section 15, Township 7 South, Range 3. The northern boundary of the Hoppers' and the Stewarts' properties is the northern boundary of Section 15. A dispute arose among the parties as to the exact location of the section line between Sections 10 and 15 and, consequently, the boundary line between their properties.
On December 16, 2005, Larry Owen filed a complaint against Marvin Hopper and Aulton Stewart in the Morgan Circuit Court alleging criminal trespass and other claims relative to the title to Owen's property. Owen sought $50,000,000 in damages and injunctive relief prohibiting Hopper and Stewart from entering his property. Hopper and Stewart answered the complaint on January 11, 2006.
The record indicates that on February 3, 2006, Hopper and Stewart filed a counterclaim complaint. Three days later, Hopper and Stewart moved to add their wives as counterplaintiffs and Judith Owen as a counterdefendant in the action; the trial court granted that motion. In their counterclaim, the Hoppers and the Stewarts asserted that they had obtained title to the disputed land through adverse possession. They asked the trial court to "establish the boundary line" between their properties and the Owens' property pursuant to a survey they submitted to the trial court.
On February 6, 2007, the trial court entered an order, stating: "This case was called for trial on February 5, 2007. The court is advised by the attorneys for the parties that the non-jury issues made the basis of the defendants/counter-plaintiffs' counterclaim must be tried prior to the jury issues of the plaintiffs' general tort claim." The trial court then ordered that a bench trial be held as to the counterclaim, followed by a separate jury trial as to the Owens' tort claims. A trial of the counterclaim was held on March 7, 2007, and the trial court received ore tenus and documentary evidence. On April 24, 2007, the trial court entered an order on the counterclaim for the Hoppers and the Stewarts and against the Owens. That order stated that the section line as determined by the survey submitted by the Hoppers and the Stewarts "is established as the boundary line that serves as the common boundary between the Hopper/Stewart properties in Section 15 and the Owen property in Section 10, Township 7 South, Range 3."
On August 28, 2007, after the denial of a purported postjudgment motion,[1] the Owens moved the trial court to certify the April 24, 2007, order as final pursuant to Rule 54(b), Ala. R. Civ. P. On August 29, 2007, the trial court entered an order expressly *955 certifying the April 24, 2007, order as final pursuant to Rule 54(b). The Owens filed a timely notice of appeal to the supreme court. This case was transferred to this court by the supreme court, pursuant to § 12-2-7(6), Ala.Code 1975.
Our supreme court has stated: "An appeal ordinarily will lie only from a final judgmenti.e., one that conclusively determines the issues before the court and ascertains and declares the rights of the parties involved." Bean v. Craig, 557 So.2d 1249, 1253 (Ala.1990); see also BB & S Gen. Contractors, Inc. v. Thornton & Assocs., Inc., 979 So.2d 121, 123 (Ala.Civ. App.2007); Trousdale v. Tubbs, 929 So.2d 1020, 1022 (Ala.Civ.App.2005). This court has recognized:
"`The issue of whether a judgment is final is jurisdictional.' Hardy v. State ex rel. Chambers, 541 So.2d 566, 567 (Ala. Civ.App.1989). Matters of jurisdiction are of such importance that a court may consider them ex mero motu. Bacadam Outdoor Adver., Inc. v. Kennard, 721 So.2d 226 (Ala.Civ.App. 1998) (citing Nunn v. Baker, 518 So.2d 711 (Ala. 1987), and Wallace v. Tee Jays Mfg. Co., 689 So.2d 210 (Ala.Civ.App.1997)). When an appellate court determines that an order from which an appeal is taken is not final and will not support an appeal, that court must dismiss the appeal on its own motion. Hardy v. State ex rel. Chambers, supra."
Trousdale v. Tubbs, 929 So.2d at 1022; see also Day v. Davis, 989 So.2d 1118 (Ala.Civ.App.2008)(dismissing as untimely an appeal from the trial court's judgment on a counterclaim in a boundary-line dispute); BB & S Gen. Contractors, Inc. v. Thornton & Assocs., Inc., 979 So.2d at 122.
In light of the foregoing authority, we must determine whether the trial court's certification of the April 24, 2007, judgment as final pursuant to Rule 54(b) was appropriate. Rule 54(b) provides, in part:
"When more than one claim for relief is presented in an action, whether as a claim, counterclaim, cross-claim, or third-party claim, or when multiple parties are involved, the court may direct the entry of a final judgment as to one or more but fewer than all of the claims or parties only upon an express determination that there is no just reason for delay and upon an express direction for the entry of judgment."
However, not every case involving a judgment as to less than all claims or parties in an action is appropriate for Rule 54(b) certification. In some cases, adjudicated claims and unadjudicated claims may be "so closely intertwined that separate adjudication would pose an unreasonable risk of inconsistent results." Branch v. SouthTrust Bank of Dothan, N.A., 514 So.2d 1373, 1374 (Ala.1987).
This court recently summarized Branch as follows.
"In Branch v. SouthTrust Bank of Dothan, N.A., supra, a bank sued Branch seeking repayment of a promissory note. Branch counterclaimed, asserting that an agent of the bank had made a fraudulent misrepresentation upon which he had relied in executing the promissory note. The trial court entered a summary judgment in favor of the bank on its claim, but it refused to enter a summary judgment in favor of the bank on Branch's counterclaim. The trial court certified the summary judgment on the bank's claim as final pursuant to Rule 54(b), and, among his arguments on appeal, Branch asserted that the trial court had erred in certifying its judgment as final. Our supreme court agreed and set aside the Rule 54(b) certification. In reaching its holding, the court stated:
"`The facts in this case, however, do not present the type of situation that *956 Rule 54(b) was intended to cover. The counterclaim asserted by Branch is based upon an alleged fraudulent representation by an agent of SouthTrust upon which Branch claims he relied in executing the promissory note. It therefore appears that the issues in the two claims in this case are so closely intertwined that separate adjudication would pose an unreasonable risk of inconsistent results.'

"Branch v. SouthTrust Bank of Dothan, N.A., 514 So.2d at 1374."
BB & S Gen. Contractors, Inc. v. Thornton & Assocs., Inc., 979 So.2d at 124.
Relying on Branch, this court in BB & S dismissed the appeal as not from a final judgment. In BB & S, the parties asserted a claim and a counterclaim against each other, each alleging that the other had breached a contract between them. The trial court entered a summary judgment on the counterclaim and certified that judgment as final pursuant to Rule 54(b). Finding that the claim and the counterclaim rested on the same disputed issue the proper interpretation of the contract this court determined that the Rule 54(b) certification was inappropriate and dismissed the appeal. BB & S, 979 So.2d at 125.
In Summerlin v. Summerlin, 962 So.2d 170 (Ala.2007), a widow petitioned the Mobile Circuit Court for an injunction requiring the cemetery where her deceased husband's remains were buried to disinter his remains so that they could be buried elsewhere. The widow named her father-in-law as a defendant, asserting that he had pressured her to have her husband's body buried in a certain location. The father-in-law filed a counterclaim asserting that the widow had breached an oral contract in which she had agreed to leave her husband's remains undisturbed in exchange for certain personal property and the father-in-law's payment of the husband's burial expenses. 962 So.2d at 171-72.
The trial court in Summerlin entered a summary judgment for the widow, granted her an injunction, and certified the judgment as final pursuant to Rule 54(b). The father-in-law appealed. The supreme court considered whether the case was appropriate for Rule 54(b) certification, stating:
"In this case, the trial court purported to enter a summary judgment as to [the widow's] entire claimnamely, her petition for injunctive relief. In form, [her] `claim' appears to be separate and distinct from [the father-in-law's] breach-of-contract counterclaim. If one looks beyond form, however, [the] breach-of-contract counterclaim is, in substance, a defense to [the widow's] petition for injunctive relief."
962 So.2d at 173 (emphasis added). The supreme court, therefore, held that the issues in the two claims were too closely intertwined to permit Rule 54(b) certification of the judgment that resolved only one of the claims. The supreme court, therefore, set aside the certification and remanded the case to the trial court. 962 So.2d at 174.
Similarly in Winecoff v. Compass Bank, 854 So.2d 611 (Ala.Civ.App.2003), this court dismissed an appeal because a Rule 54(b) certification was not appropriate. In Winecoff, Compass Bank deducted from the Winecoffs' checking account funds that Compass maintained had been overpaid to the Winecoffs on unrelated saving bonds. The Winecoffs sued Compass, alleging that the deduction was improper, and Compass counterclaimed, alleging that the deduction was proper and seeking to recover the remaining amounts it alleged it had overpaid. The trial court in Winecoff entered a summary judgment for Compass on the Winecoffs' claims and purported to certify *957 that judgment as final under Rule 54(b). The Winecoffs appealed. This court dismissed the appeal, finding that the Rule 54(b) certification was inappropriate. Specifically, this court found that "the claims and the counterclaim each rested on the issue whether Compass Bank could validly effect a setoff against the Winecoffs' joint checking account." 854 So.2d at 614 (emphasis added). Because the counterclaim, which remained pending, was related to the Winecoffs' claims, which had been resolved on summary judgment, this court found the claims to be too intertwined to support a Rule 54(b) certification of the judgment resolving only one of the claims.
In this case, as in Summerlin, supra, the Owens' claims appear to be separate from the Hoppers' and the Stewarts' counterclaim. However, looking beyond the form of the claims to their substance, the counterclaim is, in effect, a defense to Owen's original tort claims. See Summerlin, 962 So.2d at 173. As in Winecoff, the claims and the counterclaim rest on the same issue: the correct location of the boundary line between the parties' respective properties. See Winecoff, 854 So.2d at 614. Accordingly, the claims and the counterclaim involved in this action are too intertwined to support a Rule 54(b) certification as to the judgment resolving only the counterclaim, and the trial court erred in certifying its April 24, 2007, judgment as final. See Branch, 514 So.2d at 1374. We, therefore, dismiss the appeal as being from a nonfinal judgment. See Trousdale, 929 So.2d at 1022.
APPEAL DISMISSED.
PITTMAN, BRYAN, THOMAS, and MOORE, JJ., concur.
NOTES
[1]  "A valid Rule 59[, Ala. R. Civ. P.,] motion may only be filed in regard to a final judgment. Ex parte Troutman Sanders, LLP, 866 So.2d 547, 549 (Ala.2003) (`By its express terms, Rule 59(e) applies only where there is a "judgment."'); Malone v. Gainey, 726 So.2d 725, 725 n. 2 (Ala.Civ.App.1999) ('[A] Rule 59 motion may be made only in reference to a final judgment or order.')."

Day v. Davis, 989 So.2d 1118, 1120 n. 1 (Ala.Civ.App.2008).
