In this original petition for mandamus, two basic issues are presented:
Is subject matter jurisdiction proper for the enforcement of a mechanic’s lien in the county where the land is located?
Once a suit has been filed to enforce a mechanic’s lien in the county where the land is located, is a bill for declaratory judgment improper in another county when the basic issues in the two actions are the same and the parties are the same?
Our answer to both questions is in the affirmative, and we hold that mandamus is due to be granted.
Briefly, the facts are as follows:
Petitioner R. H. Moore, Sr. does business in the name of Moore’s Asphalt Paving Company. Moore and another party, Curb Specialists, Inc., supplied materials and made improvements to a tract of land in Shelby County known as Sunnydale Estates, which was being developed as residential property.
The owner of the subject property, Baker Dairy Farms, Inc., had transferred Lots 11 and 12 in the subdivision to Castleberry Construction Company on August 16, 1978, by deed which was recorded on August 28, 1978, in Shelby County. Castleberry constructed houses on the lots. Moore’s Asphalt filed a mechanic’s lien against the tract known as Sunnydale Estates in the Probate Court of Shelby County on September 1, 1978, and on October 13, 1978, filed an action at law in the Circuit Court of Shelby County to enforce the lien and secure a judgment against Johnny O’Grady and Tommy Baker, parties with whom it contracted to provide the improvements to the property.
Curb Specialists filed its lien against the property on October 10, 1978, and on November 28, 1978, filed suit in the Circuit Court of Shelby County against O’Grady, *550Baker, and Baker Dairy Farms, Inc. to enforce that lien. Both actions were pending in Shelby County, when, on May 11, 1979, Castleberry Construction Company filed a bill for declaratory judgment in the equity division of the Circuit Court of Jefferson County, and named as defendants both Moore’s Asphalt and Curb Specialists, both residents of Jefferson County. Castleberry sought a declaration of the validity of the two liens, and alleged that it could not grant a marketable title to Lots 11 and 12 because of the continuing existence of the two liens.
Moore’s Asphalt filed a motion to dismiss and a plea in abatement in the declaratory judgment action, and alleged that the Circuit Court of Jefferson County did not have subject matter jurisdiction, and that the subject matter of the declaratory judgment action was then pending in the Circuit Court of Shelby County. Moore’s Asphalt alleged that the Shelby County actions would be dispositive of all issues presented in the bill for declaratory judgment. The trial judge denied the motions and Moore’s Asphalt brought this petition for a writ of mandamus.
Is mandamus appropriate? We believe that mandamus is appropriate. In East v. Todd, 284 Ala. 495, 226 So.2d 153 (1969), this Court opined:
“As a general rule, mandamus does not lie where there is another plain, speedy, and adequate remedy available. The remedy which will supersede mandamus may be described in general terms as one competent to afford relief on the very subject matter in question, and which is equally convenient, beneficial, and effectual. 55 C.J.S. Mandamus § 17(b).”
Both Moore’s Asphalt and Curb Specialists, as lienholders, had a right to file actions to enforce their respective claims of liens in the Circuit Court of Shelby County because that was where the land was located. Code 1975, § 35-11-220. Even though Castleberry was not made a party defendant to the action filed by Moore’s Asphalt in Shelby County until after Castleberry had filed its own suit for declaratory judgment in Jefferson County, it is unquestioned that Castleberry may interpose any defense it may have regarding the validity of the Moore’s Asphalt lien in the Shelby County action. Code 1975, § 35-11-224.
The first court seized of the issues involved, if identical, whether by action for declaration, or other judgment, must be permitted to retain jurisdiction of the case. Foreman v. Smith, 272 Ala. 624, 133 So.2d 497 (1961); Auto Mutual Indemnity Co. v. Moore, 235 Ala. 426, 179 So. 368 (1938).
The lien suits would affect the property in which Castleberry claimed an interest. Castleberry was made a party to the Moore’s Asphalt action before the trial judge ruled on Moore’s Asphalt’s motion to dismiss and plea in abatement. Each of the issues raised in the declaratory judgment action can be litigated in the action in Shelby County.
The rule extant at the time of the adoption of the Rules of Civil Procedure was that jurisdiction of a declaratory judgment action will not be entertained if there is pending at the time of the declaratory judgment action another action or proceeding to which the same persons are parties, in which are involved and may be adjudicated the same identical issues that are involved in the declaratory judgment action. The Alabama Rules of Civil Procedure were adopted to effect an integrated procedural system vital to the efficient functioning of the courts and to secure the just, speedy and inexpensive determination of every action. Rule 1, ARCP. The trial judge should have abated the declaratory judgment action.
The writ of mandamus is due to be granted.
WRIT OF MANDAMUS GRANTED.
TORBERT, C. J., and JONES, SHORES and BEATTY, JJ., concur.