
407 S.W.2d 150 (1966)
PASCHALL'S, INC.
v.
J.P. DOZIER and wife, Mrs. Ethel A. Dozier.
Supreme Court of Tennessee.
September 23, 1966.
*151 John Henderson, Jr., Henderson & Henderson, Franklin, for plaintiff in error.
C. D. Berry, McWilliams & Berry, Franklin, for defendants in error.

OPINION
BURNETT, Chief Justice.
This case involves an appeal from an order of the trial court sustaining the demurrer of the defendants-in-error and dismissing the amended bill of the plaintiff-in-error.
The parties will hereinafter be referred to as they appeared in the trial court; that is, Paschall's, Inc., as the complainant, and J.P. Dozier and wife, Ethel A. Dozier, as the defendants.
In the view which this Court takes, the pertinent facts of this case are as follows:
(1) The complainant, between June 21, 1963, and December 19, 1963, furnished certain materials and labor used in the construction of a bathroom addition to the defendants' house.
(2) Said materials and labor were furnished by the complainant at the specific requests of Mrs. Mary Best, the defendants' daughter, and Ronald Cheney, son of Mary Best, and credit was extended to these persons. Both Mary Best and Ronald Cheney were then, and still are, residing with the defendants in the latter's house.
(3) The complainant has attempted to collect the debt from Mary Best but his efforts have been of no avail.
*152 (4) Subsequently, Mary Best was adjudicated a bankrupt on a petition filed by her in the United States District Court for the Middle District of Tennessee on October 12, 1964. Said petition listed the account of the complainant as one of the petitioner's debts. Whether or not she has been granted a discharge is unknown to this Court.
The complainant commenced this suit in the Chancery Court of Williamson County, Tennessee, to secure a mechanic's lien on the defendants' property and to recover a personal judgment against the defendant for the value of the labor and materials furnished.
The defendant interposed a demurrer on the grounds that the complaint on its face showed that there was no special contract with the defendants and that the complainant had lost its right to a mechanic's lien by failure to comply with the requisites set forth in T.C.A. § 64-1101 et seq. The demurrer was ultimately sustained and the complainant's bill was dismissed. The correctness of that ruling is the question now under consideration by this Court.
The complainant concedes his loss of the right to a mechanic's lien and does not assail the sustainment of those grounds of the demurrer relevant to the lien. However, the complainant asserts that, notwithstanding the loss of the right to a mechanic's lien, the original bill, as amended, continues to state a good cause of action on the theory of unjust enrichment, upon which it is entitled to a hearing on the merits. Antithetically, the defendants contend that the right to a mechanic's lien is the sole and exclusive remedy against the defendants, and that having lost the same, complainant is not entitled to a personal judgment.
The only question confronting this Court is whether or not the complainant's amended bill states a good cause of action upon which it is entitled to a hearing on the merits, notwithstanding the loss of the right to a mechanic's lien.
In ascertaining the merit of the complainant's contention we must examine closely the following significant excerpt from the complainant's bill:
"Said materials and labor were furnished and performed by B.H. Paschall, Jr., d/b/a Paschall's Shopping Center, and by Complainant at the specific requests of Mrs. Mary Best, a daughter of Defendants, and Ronald Chency, a son of Mrs. Mary Best and the duly authorized agent of the said Mrs. Mary Best at all times complained of herein, both of whom were then, and still are, residing with Defendants in the dwelling house heretofore mentioned. Said materials and services were furnished and performed in the construction of the addition heretofore mentioned with the full knowledge and consent of Defendants. The construction of said addition has enhanced the value of the property heretofore described, and Defendants have been unjustly enriched by the construction of same, without their giving remuneration therefor." (Emphasis added.)
It is a well established rule that demurrers are not favored at law and will be overruled if, by a fair and reasonable intendment, the pleading states, however inartificially, a good cause of action. See Holland Bros. Electric Co. v. M.W. Kellogg Co., 205 Tenn. 352, 326, S.W.2d 649; Jones v. Allied Am. Mut. Fire Ins. Co., 38 Tenn. App. 362, 274 S.W.2d 525.
Applying this test of liberal construction, we agree with the complainant that the amended bill states a good cause of action against the defendants on the theory of unjust enrichment.
A perusal of the record indicates that the trial court's sustainment of the defendant's demurrer was primarily based on the cases of Jordan v. Deitz, 201 Tenn. 77, *153 83, 296 S.W.2d 866, and Taylor v. Tennessee Lumber Co., 107 Tenn. 41, 63 S.W. 1130, both of which we take this opportunity to review.
In Jordan v. Deitz, supra, among other things, this Court decided that in a suit by a subcontractor against a landowner, with whom there is no privity of contract, the principal contractor is a necessary and indispensable party to the suit. However, that rule was merely our exegesis of T.C.A. § 64-1126, as unamended, which concerns methods of enforcing mechanic's liens. Subsequent to that decision, the statute was amended to read as follows:
"(2) Where there is no such contract, by attachment in court of law or equity * * * the writ of attachment to be accompanied by a warrant for the sum claimed, to be served upon the owner and may within the discretion of the plaintiff or complainant be served upon the contractor, or subcontractor in any degree, with whom the complainant is in contractual relation, but the owner shall have the right to make said contractor or subcontractor a defendant by cross-action or cross-bill as is otherwise provided by law." (Emphasis added.)
In our opinion, this amendment is a clear manifestation of the Legislature's intent to change the result of the Jordan case, so that in a suit to enforce a mechanic's lien by one who is not in privity of contract with the landowner, the contractor is no longer a necessary and indispensable party to the suit.
Both the Jordan and Taylor cases are relied on as standing for the proposition that a materialman, who is without privity of contract with the landowner, is not entitled to a personal judgment against the owner. That the trial court grounded its dismissal of the complainant's bill on this proposition is clearly evinced by the following statement from the Chancellor's opinion:
"Here the complainant does not allege that he had a contractual relationship with the owner through an agent or otherwise, so it is not entitled to a personal judgment against the owners, defendants. * * *."
We are convinced that the trial court was clearly in error in arriving at this conclusion. Nothing which we said in the Jordan or Taylor cases was intended to preclude the possibility of a suit on quantum meruit which is indeed an action in personam. Those cases involved no question of unjust enrichment, and consequently, this Court gave no consideration to the propriety of such a remedy. To hold that, in absence of a mechanic's lien, privity of contract is a prerequisite in all actions to recover the value of labor and material furnished, would not only open the door to fraud, but would completely abrogate the common law remedy of quantum meruit.
The rule we announced in the Jordan and Taylor cases was perhaps stated more unequivocally in Lundstrom Const. Co. v. Dygert, 254 Minn. 224, 94 N.W.2d 527, where J. Matson, speaking on behalf of the Minnesota Supreme Court, held:
"Aside from unjust enrichment, which is an element not involved here, it is generally recognized that, other than the statutory right to a mechanic's lien or other special statutory remedies, subcontractors and materialmen have no right to a personal judgment against the owner where there is no contractual relation between them." (Emphasis added.)
The law recognizes two distinct types of implied contracts; namely, contracts implied in fact and contracts implied in law, commonly referred to as quasi contracts. The distinction between the two has been explicitly stated by the Court of Appeals in Weatherly v. American Agr. *154 Chemical Co., 16 Tenn.App. 613, 65 S.W.2d 592:
"Contracts implied in fact arise under circumstances which, according to the ordinary course of dealing and common understanding of men, show a mutual intention to contract. Such an agreement may result as a legal inference from the facts and circumstances of the case. * * * `Contracts implied in law, or more appropriately, quasi or construction contracts, are a class of obligations which are imposed or created by law without the assent of the party bound, on the ground that they are dictated by reason and justice * * *.'"
Actions brought upon theories of unjust enrichment, quasi contract, contracts implied in law, and quantum meruit are essentially the same. Courts frequently employ the various terminology interchangeably to describe that class of implied obligations where, on the basis of justice and equity, the law will impose a contractual relationship between parties, regardless of their assent thereto.
It is well established that want of privity between parties is no obstacle to recovery under quasi contract. 17 C.J.S. Contracts § 6, p. 572; Mill and Logging Supply Co. v. West Tenino Lumber Co., 44 Wash.2d 102, 265 P.2d 807.
The apparent reason is that such contracts are not based upon the intention of the parties but are obligations created by law. They are founded on the principle that a party receiving a benefit desired by him, under circumstances rendering it inequitable to retain it without making compensation, must do so. See Noone v. Fisher (D.C.Tenn.), 45 F. Supp. 653, 655; 35A Words and Phrases, Quasi Contract, p. 430.
That our decision in the Taylor case was not intended to preclude a materialman from recovering a personal judgment on equitable grounds, where there is no privity of contract, is evinced by at least two subsequent decisions by the Court of Appeals, with whom we agreed by denying certiorari.
In Ford v. Whittle Trunk and Bag Co., 12 Tenn.App. 486, the complainant had furnished labor and materials to the defendant corporation without the authority, but with the consent, of the general manager. The Court concluded that there was no special contract between the parties and that recovery was not secured by a mechanic's lien. Nevertheless, the materialman was allowed to recover on the "equities of estoppel."
Again in Province v. Mitchell, 44 Tenn. App. 115, 312 S.W.2d 861, absence of privity was no bar to a personal judgment on behalf of a materialman who had furnished materials in the improvement of the defendant's property, but who failed to establish a special contract with the defendant. In granting recovery to the materialman, the court concluded:
"If then, as we hold, there was no express contract * * * the only obligation which Mrs. Mitchell was under was that imposed by law, which was to pay on a quantum meruit basis or as the result of an implied contract to pay the reasonable value of the material and labor furnished by complainants." (Emphasis added.)
The defendants assert that an implied undertaking cannot arise against one benefited by the work performed, where the work is done under a special contract with another. While this may be the general rule, we do not think that it is applicable in every case. Indisputably, where one is afforded recovery from the person with whom he has a contract, he cannot also recover from third persons incidentally benefited by his performance. In such a case it could hardly be said that the retention of the benefit by the third party is unjust as to the furnisher. However, the situation is dissimilar where a person furnishes materials and labor under a contract for the benefit of a third party, and that *155 contract becomes unenforceable or invalid. In that situation there is certainly no reason to preclude the furnisher or subcontractor from seeking recovery against the third person on the theory of quantum meruit.
Our perusal of cases in other jurisdictions has revealed several decisions which, we believe, lend support to our reasoning in the case at bar.
In DeGasperi v. Valicenti, 198 Pa.Super. 455, 181 A.2d 862, the complainant sought to recover for construction work done on the defendant's land under a contract with the defendant's husband. Although there was no privity between the complainant and the defendant landowner, the court allowed recovery against the latter on the theory of quasi contract. The court reasoned that since the defendant wife owned the land, she had been unjustly enriched at the complainant's expense.
In Karon v. Kellogg, 195 Minn. 134, 261 N.W. 861, the plaintiff sought a mechanic's lien and a personal judgment against a landowner for materials and labor furnished in the improvement of the latter's land. The services were performed at the specific requests of the defendant's brother, who was occupying the land. As in the present case, the plaintiff was disallowed the lien because of failure to properly perfect the same. Nevertheless, recovery was permitted on the theory of unjust enrichment. Arriving at its conclusion the court stated:
"Having been so benefited, defendant is liable, quasi ex contractu, independently of contract or agency." (Emphasis added.)
Matter of Estate of Phillips, 10 Misc.2d 714, 173 N.Y.S.2d 632, held that a claim for certain materials and labor on the decedent's property was a debt of the decedent's estate on the basis of unjust enrichment, notwithstanding the fact that the decedent did not order the work, but that it was done at the request of the decedent's daughter.
In the very recent case of Beacon Homes, Inc. v. Holt, 266 N.C. 467, 146 S.E.2d 434, the complainant, at the request of the defendant's mother, erected a house on land owned by the defendant. The complainant's performance was executed under misconception that the mother owned the land in question. In a suit brought against the defendant landowner, it was held that the complainant's bill stated a good cause of action in unjust enrichment.
Based upon the foregoing authorities, we hold that where a materialman or subcontractor furnishes labor or materials which benefit the property of a person with whom there is no privity of contract, an action on quantum meruit may lie against the landowner to recover the reasonable value of said labor and materials so furnished.
We wish to make it clear that recovery on such an action may not be had in every instance where a subcontractor or materialman has furnished materials or labor which benefit a third person. Our decision in this case is limited to affirming the propriety of quasi contract as a remedy in such factual situation. Each case must be decided according to the essential elements of quasi contract, to-wit: A benefit conferred upon the defendant by the plaintiff, appreciation by the defendant of such benefit, and acceptance of such benefit under such circumstances that it would be inequitable for him to retain the benefit without payment of the value thereof.
The most significant requirement for a recovery on quasi contract is that the enrichment to the defendant be unjust. Consequently, if the landowner has given any consideration to any person for the improvements, it would not be unjust for him to retain the benefit without paying the furnisher. Also, we think that before recovery can be had against the landowner on an unjust enrichment theory, the furnisher of the materials and labor must have exhausted his remedies against the person with whom he had contracted, and still has not received the reasonable value of his services.
*156 We are not incognizant of some decisions in other jurisdictions which have denied the subcontractor or materialman relief in similar fact situations. However, the great majority of those cases are distinguishable from the present case in that they concerned questions involving the merits of the cases. As heretofore stated, in the case at bar we are concerned solely with the propriety of unjust enrichment as a remedy where there is no privity of contract. Many of those cases denying the subcontractor or materialman recovery proceeded on agency theories with absolutely no allegations of unjust enrichment. See e.g. Porter v. Marotta, Tex.Civ.App., 267 S.W.2d 222. Others have based their decision on an estoppel by the subcontractor because of his failure to give the landowner timely notice of the principal contractor's default. See e.g. Goldberg v. Barta, (D.C.Mun. App.) 109 A.2d 779. By far the most frequent ground employed to preclude relief on quasi contract has been a finding that the enrichment is not unjust. See e.g. Cohen v. Delmar Drive-In Theatre, 7 Terry (Del.) 427, 84 A.2d 597; Chatfield v. Fish, 126 Conn. 712, 10 A.2d 754. The point to be made is that none of these cases have gone so far as to deny the availability of quasi contract as a remedy to a materialman. Consequently, we do not think these decisions are inconsonant with our opinion in this case.
We believe that equity and good conscience, as well as the authorities cited, support our decision in this case and that the complainant should be given a hearing on the merits of his allegations.
Consequently, we remand this case to the trier of facts to determine whether or not the defendant has been so unjustly enriched at the detriment of the complainant so as to require him to make compensation therefor.
The decree dismissing the bill of the complainant is reversed and the cause remanded.
