
853 So.2d 963 (2002)
Milford W. BURNETT and Evelyn Burnett
v.
Miguel A. MUNOZ and Bernice Blackwell Munoz.
2010890.
Court of Civil Appeals of Alabama.
December 13, 2002.
Linda L. Howard of Laurence P. Sutley & Associates, P.C., Foley, for appellants.
Bayless E. Biles of Wilkins, Bankester, Biles & Wynne, Bay Minette, for appellees.
THOMPSON, Judge.
Miguel A. Munoz and Bernice Blackwell Munoz sued coterminous landowners Milford W. Burnett and Evelyn Burnett. In their complaint, the Munozes sought a judgment declaring a strip of land located between their property and that of the Burnetts to be a public road. For the purposes of this decision, we will refer to the strip of property at issue as a "road"; in doing so, we are not deciding whether the road was a public or a private road.
The Burnetts answered the Munozes' complaint and denied that the road was a public road. The trial court conducted a hearing at which ore tenus evidence was presented. On April 4, 2002, the trial court entered a judgment declaring the road to be a public road. The Burnetts filed a postjudgment motion; the trial court denied that motion. The Burnetts appealed. The case was transferred to this court by the supreme court, pursuant to § 12-2-7(6), Ala.Code 1975.
The parties' properties are located in Baldwin County; the record does not indicate whether the road and the parties' properties are located in a municipality.
*964 The Burnetts have owned their property for 40 years and have lived on the property for 11 years. The Munozes have owned and resided on their property for 27 years. The road at issue in this appeal runs between two parcels of real property owned by the parties and provides access for the Munozes to that part of their property on which the house in which they reside is located. The road also allegedly provides access to two additional parcels of real property, one of which is owned by the Burnetts and the other by the Munozes.
The ore tenus hearing primarily focused on evidence presented by the parties regarding their dispute over the width of the road. The Munozes contend that the road is 30 feet wide. The Burnetts contend that the road is actually only 15 feet wide and that the additional 15 feet claimed by the Munozes constitutes an encroachment on their property.
The record indicates that the road is unpaved. Miguel Munoz testified that he has maintained the road for 27 years. Also, Munoz testified that the county has installed a "culvert" under the road and that the culvert is 30 feet long.
At one point on the road, a large oak tree stands in what the Munozes contend is the middle of the 30-foot-wide road. Munoz testified that one may drive a vehicle on the road to either the left side or the right side of the tree. The Burnetts disputed whether it has always been possible to drive around the left side of the tree.
The record does not clearly indicate the length of the road. However, the road extends past the property on which the Munozes' house is located, past a parcel owned by the Burnetts that is located directly behind the property on which the Munozes' house is located, and ends at a parcel of farmland owned by the Munozes. The Munozes presented evidence indicating that they or their predecessors in interest had used the road to access their properties since at least the 1960's; some evidence was presented indicating that the Munozes' predecessors in interest had used the road to access the property for approximately 50 years. The record also contains some vague testimony indicating that at some point, two "Jim Walter homes"[1] were located on the Munozes' property and that the residents of those houses used the road to access those houses. Those houses are no longer located on the property; it is unclear from the record when those houses were removed from the property.
In its judgment, the trial court found that the evidence presented at the ore tenus hearing established that the road had been used as a public road for more than 50 years.
"A public road is established in one of the following three ways: (1) by a regular proceeding for that purpose; (2) by a dedication of the road by the owner of the land it crosses and a subsequent acceptance by the proper authorities; or (3) by the road's being used generally by the public for a period of 20 years."

Fox Trail Hunting Club v. McDaniel, 785 So.2d 1151, 1154 (Ala.Civ.App.2000) (citing Auerbach v. Parker, 544 So.2d 943 (Ala.1989)). On appeal, the Burnetts contend that the trial court's determination that the road was a public road is not supported by the evidence. However, another issue is dispositive of this appeal.
Rule 19(a), Ala. R. Civ. P., provides in part:

*965 "(a) Persons to Be Joined if Feasible. A person who is subject to jurisdiction of the court shall be joined as a party in the action if (1) in the person's absence complete relief cannot be accorded among those already parties, or (2) the person claims an interest relating to the subject of the action and is so situated that the disposition of the action in the person's absence may (i) as a practical matter impair or impede the person's ability to protect that interest or (ii) leave any of the persons already parties subject to a substantial risk of incurring double, multiple, or otherwise inconsistent obligations by reason of the claimed interest."
It is well settled that the failure to join necessary parties is an issue that may be raised for the first time on appeal by the parties or by an appellate court ex mero motu. Boles v. Autery, 554 So.2d 959 (Ala.1989); Long v. Vielle, 549 So.2d 968 (Ala.1989); J.C. Jacobs Banking Co. v. Campbell, 406 So.2d 834 (Ala.1981); Mead Corp. v. City of Birmingham, 350 So.2d 419 (Ala.1977); Box v. Box, 253 Ala. 297, 45 So.2d 157 (1950); Amann v. Burke, 237 Ala. 380, 186 So. 769 (1939). The failure to join a necessary party is a jurisdictional defect. Long v. Vielle, supra (citing Rogers v. Smith, 287 Ala. 118, 248 So.2d 713 (1971)).
Our supreme court has discussed the issue of necessary parties in actions involving a dispute regarding a public road. In Holland v. City of Alabaster, 566 So.2d 224 (Ala.1990), the City of Pelham vacated a public road that was located within its city limits. That road was abutted on both sides by land owned by Holland; after the City of Pelham vacated the road, Holland blocked access to the road. The City of Alabaster and a person who had used the road sued Holland, seeking access to the road. The trial court, among other things, set aside the City of Pelham's vacation of the road and restrained Holland from blocking access to the road. On appeal, Holland maintained that the trial court erred in failing to join the City of Pelham as a necessary party to the action. Our supreme court agreed. The court held that the trial court should have joined the City of Pelham as a necessary party under Rule 19(a), Ala. R. Civ. P., because the trial court was required to have jurisdiction over the City of Pelham before it could enter any ruling that affected the City of Pelham's interest in the property at issue in that case. Holland v. City of Alabaster, 566 So.2d at 228. In the absence of the City of Pelham as a party to the action, the trial court lacked that jurisdiction to enter a ruling affecting the City of Pelham's rights. In reaching its holding in Holland, the supreme court discussed whether the trial court could grant complete relief where the City of Pelham had not been joined as a necessary party:
"Can complete relief be afforded among those already parties? We do not believe so. The City of Pelham is required under the trial court's order to assume duties of policing and maintaining a road that it wished to vacate. The City of Pelham is also now required to maintain a public thoroughfare, which the evidence shows may or may not be suitable for traffic, without any hearing on the matter. Moreover, the City of Pelham will now incur liability to the public for any failure of maintenance with respect to this road. While ordering Holland to refrain from obstructing the road will provide Hill with a possible route to travel, it does so at the expense of the City of Pelham. We cannot see that Alabaster should be afforded relief of the opening of a road that is not within its city limits, and lies within the city limits of Pelham in the absence of the City of Pelham's presence in the *966 judicial proceedings that afford Alabaster this remedy....
"Does the City of Pelham claim an interest relating to the subject of the action so that the disposition of the case without the City, as a practical matter, will impair or impede its ability to protect that interest? We believe so. Although Holland is the party actually claiming that the City of Pelham has an interest, the City of Pelham cannot properly protect its interest in vacating roads within its municipal limits unless it is given a fair hearing before a vacation of such a road is set aside."
Holland v. City of Alabaster, 566 So.2d at 227.
In Boles v. Autery, supra, our supreme court used similar reasoning in a case involving whether a road was a public or a private road. In Boles v. Autery, buyers of certain real property located in Autauga County sued the sellers of that property alleging that the sellers had breached the parties' contract by failing to advise them that a road accessing the property was a private, rather than a public, road. The trial court found in favor of the buyers. On appeal, the sellers argued that Autauga County was a necessary party to the action. Our supreme court agreed, and it reversed the trial court's judgment in favor of the buyers and remanded the case to the trial court. The court explained that:
"The trial court's determination of whether the road was public or was private might affect not only the rights of the individual litigants but also the rights of members of the public to use the road, the duty of the county to maintain it, and the liability of the county for failure to maintain it. If the county is not joined as a party, then neither it nor other members of the public are bound by the trial court's ruling. Accordingly, if the county and other persons are not bound, then the status of the road as public or private is subject to being litigated again, and the results of later litigation may be inconsistent with the results of the initial litigation. We note the following as a possible example: Suppose the landowners, over the course of time, allow the road to fall into disrepair, and a school bus carrying children has an accident because of the road's deterioration. Would the county be liable for its failure to maintain the road? Coupled with the other problems discussed, that possibility of contradictory rulings about the status of the road as public or private is a sufficient reason to require the joinder of Autauga County as a party. See also Johnston [v. White-Spunner, 342 So.2d 754 (Ala.1977)]. `The desirability of judicial economy must give way to the orderly administration and demands of justice.' Mead Corp. v. City of Birmingham, 350 So.2d 419 (Ala.1977)."
Boles v. Autery, 554 So.2d at 961.
In this case, the parties did not join Baldwin County or any municipality in which the road is located (if it is located within a municipality) in the action to determine whether the road was a public road. It is clear from the authorities discussed above that a county or municipality in which a road is located incurs liabilities if the road is declared to be a public road. See Holland v. City of Alabaster, supra; Boles v. Autery, supra. We conclude that before the trial court may declare a road to be a public road, and thereby impose on a county or a municipality liabilities such as the responsibility to maintain and police the road, the affected county or municipality must be made a party to the action before the trial court. In this case, neither the county nor the municipality, if any, in which the road at issue is located *967 was not a party to the action before the trial court; that county or municipality is a necessary party to any action seeking to have the road declared to be a public road. Therefore, we reverse the trial court's judgment and remand for proceedings consistent with this opinion.
REVERSED AND REMANDED.
YATES, P.J., and CRAWLEY, PITTMAN, and MURDOCK, JJ., concur.
NOTES
[1]  Jim Walter Homes, Inc., builds houses to an agreed-upon percentage of completion (up to 90%), and the buyer finishes the house.
