
67 S.E.2d 390 (1951)
234 N.C. 347
EQUITABLE LIFE ASSURANCE SOCIETY OF UNITED STATES et al.
v.
BASNIGHT et al.
No. 305.
Supreme Court of North Carolina.
October 31, 1951.
*393 J. L. Emanuel, Raleigh, and Albion Dunn, Greenville, for plaintiffs-appellants.
James & Speight, Greenville, for defendant-appellee, W. G. Dunn.
ERVIN, Justice.
This question arises at the outset: Where a lien claimant files notice of a contractor's lien against a building and the lot on which it stands in the office of the clerk of the superior court on March 15, 1949, for work done and materials furnished by him in the construction of the building under contract with the owners of the lot between August 14 and November 27, 1948, does the lien relate back to the time when the lien claimant began the performance of the work and the furnishing of the materials, and take precedence by reason of such relation back over an intervening recorded deed of trust made by the owners of the lot on February 17, 1949?
The trial judge answered this query in the affirmative when he adjudged that the lien of the contractor Dunn has priority as against the deed of trust under which Equitable and Albion Dunn, trustee, claim. We affirm his ruling on the authority of these decisions: King v. Elliott, 197 N.C. 93, 147 S.E. 701; Harris v. Cheshire, 189 N.C. 219, 126 S.E. 593; Porter v. Case, 187 N.C. 629, 122 S.E. 483; McAdams v. Piedmont Trust Co., 167 N.C. 494, 83 S.E. 623; Dunavant v. Caldwell & N. Railroad, 122 N.C. 999, 29 S.E. 837; Pipe & Foundry Co. v. Howland, 111 N.C. 615, 16 S.E. 857, 20 L.R.A. 743; Burr v. Maultsby, 99 N.C. 263, 6 S.E. 108, 6 Am.St.Rep. 517; and Chadbourn v. Williams, 71 N.C. 444.
In so doing, we do not ignore the contentions of Equitable and Albion Dunn, trustee, on this phase of the case. They advance these successive and interdependent arguments with much earnestness and industry: (1) The doctrine that a contractor's lien for work done or materials furnished relates back to the time when the claimant commenced the performance of the work or the furnishing of the materials has no foundation in law save that embodied in a statute orginally enacted as section 2 of chapter 206 of the public laws of 1869-70 and subsequently codified as section 1782 of the Code of 1883, which was couched in these words: "The lien for work on crops or farms or materials given by this chapter shall be preferred to every other lien or encumbrance, which attached upon the property subsequent to the time at which the work was commenced or the materials were furnished." (2) This foundation of the relation back doctrine was removed as to all liens arising under the laws now incorporated in chapter 44 of the General Statutes except liens for work on crops in 1905 when the codifiers of the Revisal changed the statute, i. e., section 2 of chapter 206 of the public laws of 1869-70 and section 1782 of the Code of 1883, to its present form, to-wit: "The lien for work on crops given by this chapter shall be preferred to every other lien or encumbrance which attached to the crops subsequent to the time at which the work was commenced." G.S. § 44-41; C.S. 2472; Rev. 2034. (3) As a consequence, the relation back doctrine has no application to the lien of the contractor Dunn, and the deed of trust under which Equitable and Albion Dunn, trustee, claim has priority because it was made and recorded before the notice of Dunn's lien was filed.
These arguments are untenable for reasons even more cogent than the significant fact that their acceptance would constitute a repudiation of all germane decisions *394 handed down since the adoption of the Revisal of 1905.
Two of the present statutes giving liens to contractors for labor performed or materials furnished, namely G.S. § 44-1 and G.S. § 44-2, had their genesis in chapter 206 of the public laws of 1869-70. Section 2 was not put in that chapter to establish the relation back doctrine, and did not do so. It simply selected three specific liens, i. e., liens "for work on crops or farms or materials," out of all the liens given to contractors by sections 1 and 3 of the chapter, and conferred upon such three specific liens preference over all other liens and encumbrances (including other liens given to contractors) "which attached upon the property subsequent to the time at which the work was commenced or the materials were furnished." These considerations show that the relation back doctrine was not begotten by section 2 of chapter 206 of the public laws of 1869-70, and is not nurtured by its present day counterpart. G.S. § 44-41.
The doctrine is inherent in the very statutes which give the contractor the lien upon the property improved by his labor or materials, and allow him six months after the completion of the labor or the final furnishing of the materials in which to claim it; for it is plain that unless the contractor's lien when filed relates back to the time at which the contractor commenced the performance of the work or the furnishing of the materials, the object of the statutes can be defeated at the will of the owner of the property, by his selling or encumbering his estate. Burr v. Maultsby, supra; Chadbourn v. Williams, supra. To hold that the doctrine of relation back is not inherent in these statutes would be to "keep the word of promise to our ear, and break it to our hope."
This brings us to the second and final question presented by the appeal: Does a contractor's prior lien become unavailable as against subsequent encumbrancers by the contractor's failure to make the subsequent encumbrancers parties to his action to enforce the lien brought against the owners within the statutory period?
Dunn, the builder, bottoms his claim to a contractor's lien against the real property in controversy on this statutory provision: "Every building built, rebuilt, repaired or improved, together with the necessary lots on which such building is situated * * *, shall be subject to a lien for the payment of all debts contracted for work done on the same, or material furnished." G.S. § 44-1.
A contractor's lien on real property is inchoate until perfected by compliance with legal requirements, and is lost if the steps required for its perfection are not taken in the manner and within the time prescribed by law. 36 Am.Jur., Mechanics' Liens, Section 124; 57 C.J.S., Mechanics' Liens, § 119.
To perfect his lien on real property, the contractor must comply with these statutory requirements:
1. He must file a notice or claim of lien in the office of the clerk of the superior court of the county where the labor has been performed or the materials furnished within six months after the completion of the labor or the final furnishing of the materials specifying in detail the labor performed or the materials furnished and the time thereof. G.S. §§ 44-38 and 44-39; Beaman v. Elizabeth City Hotel Corp., 202 N.C. 418, 163 S.E. 117; Atlas Supply Co. v. McCurry, 199 N.C. 799, 156 S.E. 91.
2. He must bring an action in the superior court to enforce the lien within six months from the date of the filing of the notice or claim of lien. G.S. §§ 44-43 and 44-48(4); Norfleet v. Tarboro Cotton Factory, 172 N.C. 833, 89 S.E. 785.
These things being true, the present position of Equitable and Albion Dunn, trustee, i. e., that the lien claimed by Dunn is not available as against them, is sound, if subsequent encumbrancers are necessary parties to a statutory action to enforce a contractor's lien on real property.
The term "necessary parties" embraces all persons who have or claim material interests in the subject matter of a controversy, which interests will be directly *395 affected by an adjudication of the controversy. Wiggins v. Harrell, 200 N.C. 336, 156 S.E. 924. A sound criterion for deciding whether particular persons must be joined in litigation between others appears in this definition: Necessary parties are those persons who have rights which must be ascertained and settled before the rights of the parties to the suit can be determined. 67 C.J.S., Parties, § 1.
The statute does not undertake to specify who shall be made parties to the action to enforce the contractor's lien, which it requires to be brought within the period of six months designated by it. The solution of this problem is, therefore, to be found in the nature and object of the action to enforce the lien.
Such action is designed to enforce the lien by the sale of whatever interest the person who caused the building to be erected or repaired had in the land improved by the labor or materials of the contractor at the time the lien attached. G.S. § 44-46; Pipe & Foundry Co. v. Howland, supra; Burr v. Maultsby, supra; Chadbourn v. Williams, supra. Since the judgment in the action will directly affect his interest in the real property involved in the suit, the landowner, who contracted the debt for which the lien is claimed, is certainly a necessary party to the action to enforce the lien. 57 C.J.S., Mechanics' Liens, § 284b.
But the action to enforce the lien is not created to determine the validity or the priority of the adverse claims of third persons in the premises subject to the lien. The contractor can obtain the complete relief sought, i. e., the sale of the interest owned by the person who caused the improvement to be made at the time the lien attached, in his action against the land owner, without having the rights of adverse claimants ascertained and settled. In consequence, subsequent encumbrancers and other adverse claimants are not necessary parties to an action to enforce a contractor's lien. This holding is expressly or impliedly sanctioned by earlier decisions of this Court. Porter v. Case, supra; Lookout Lumber Co. v. Mansion Hotel & B. R. Co., 109 N.C. 658, 14 S.E. 35; Kornegay v. Farmers' & Merchants' Steamboat Co., 107 N.C. 115, 12 S.E. 123.
It necessarily follows that neither the contractor nor any other interested party is precluded from relying on the contractor's prior lien as against subsequent encumbrancers because of the contractor's failure to make the subsequent encumbrancers parties to his action to enforce the lien brought against the owners within the statutory period. Sandquist & Snow v. Kellogg, 101 Fla. 568, 133 So. 65, 136 So. 235.
We deem it appropriate to make certain observations relating to this aspect of the case. While the court can adjudicate the rights of the contractor and the landowner in an action to enforce a contractor's lien without necessarily affecting them, subsequent encumbrancers and other adverse claimants are proper parties to such action, for they have ascertainable interests in the subject matter of the controversy. 36 Am.Jur., Mechanics' Liens, section 249. It is highly desirable that they be made parties to the action to enforce the lien so that the decree or judgment in such action may conclude the rights of all persons having any interest in the subject matter of the litigation.
If a subsequent encumbrancer is not joined, he is not bound by the judgment in the action between the contractor and the owner, and one who purchases the property under that judgment takes it subject to the rights of the encumbrancer, whatever they may be. Jones v. Williams, 155 N.C. 179, 71 S.E. 222, 36 L.R.A.,N.S., 426.
It is to be noted that we are presently concerned with the rights of those who become encumbrancers after the lien attaches and before the action to enforce it is brought, and that none of the parties to the present action challenge the provisions of Judge Grady's decree ordering a resale of the property.
For the reasons given, the judgment is affirmed.
