
739 So.2d 183 (1999)
Toufic NASSIF
v.
SUNRISE HOMES, INC., Coast Quality Construction Company, and Shirley Nassif.
No. 98-C-3193.
Supreme Court of Louisiana.
June 29, 1999.
*184 Jack Edward Morris, David Charles Loeb, Daniel Edward Zelenka, II; Molaison, Price & Loeb, Gretna, for Counsel for Applicant.
Larry Gene Canada, Brynn Marie Baiamonte, Steven M. Spiegel; Galloway, Johnson, Tompkins & Burr, New Orleans; Michael R. Allweiss; Lowe, Stein, Hoffman, Alweiss & Hauver, New Orleans, Counsel for Respondent.
MARCUS, Justice.[*]
Shirley Nassif purchased a house in Woodmere South Subdivision from Sunrise Homes, Inc., on May 31, 1984. Two months later, Ms. Nassif sold the house to her cousin, Toufic Nassif (Nassif). When Nassif noticed that the foundation of the house was experiencing differential settlement problems, he filed suit in redhibition against Sunrise Homes, Inc., Shirley Nassif and Coast Quality Construction Company (Coast), the real estate developer who built the house. Coast filed a third-party demand against J.J. Krebs & Sons, Inc. (Krebs), the engineering firm that designed the foundation of the house, for full indemnity for any and all sums for which Coast might be held liable to Nassif in the main demand.
After trial on the merits, judgment was rendered in favor of Nassif and against Coast ordering recission of the sale, and awarding Nassif damages in the amount of $55,240.00, plus interest, costs and attorney fees pursuant to La. Civ.Code art. 2545. Judgment was further rendered in favor of Coast, by way of indemnity, against Krebs for $55,240.00, plus interest, costs and reasonable attorney fees. The trial judge specifically found that the house contained a redhibitory defect; that Krebs negligently performed the engineering services it had agreed to perform; and that all of the damages suffered by Nassif *185 and Coast were caused by Krebs' failure to perform as intended. After a hearing to determine the proper assessment of attorney fees, judgment was rendered in favor of Nassif's attorneys, Lowe, Stein, Hoffman, Allweiss and Hauver, L.L.P., and against Coast for $141,646.31. The trial judge further ordered that there be judgment granting "full indemnity" in favor of Coast and against Krebs for the same amount. All parties appealed. The court of appeal amended the trial court judgment by increasing Nassif's damage award to $72,587.43 and by reducing the award of attorney fees to $135,928.31. In all other respects, the judgment was affirmed, "except for [the] order requiring J.J. Krebs to indemnify Coast for the attorney's fees and costs, which it was ordered to pay Lowe, Stein." The court of appeal reasoned that attorney fees are allowed only where authorized by statute or contract. Because there was no statutory authority or contract of indemnification providing for an award of attorney fees against Krebs, the court of appeal concluded that the trial judge erred in holding Krebs ultimately liable for Nassif's attorney fees.[1] Upon application of Coast, we granted certiorari to review the correctness of that decision.[2] Kreb's application to this court contesting its fault was denied.[3]
The sole issue before us for review is whether a defendant, whose liability to a plaintiff for the plaintiff's attorney fees resulted from the actual fault of another, may recover, by way of indemnity, the amount of such attorney fees from the party actually at fault.
As a general rule, attorney fees are not allowed except where authorized by statute or contract. Maloney v. Oak Builders, Inc., 256 La. 85, 235 So.2d 386, 390 (1970). Because Coast is seeking indemnity for the attorney fees it was compelled to pay Nassif, rather than reimbursement for its own attorney fees, we must begin by examining the basic law of indemnity, and the distinction between an action for indemnity and an action for attorney fees.
Indemnity in its most basic sense means reimbursement, and may lie when one party discharges a liability which another rightfully should have assumed. Black's Law Dictionary 769 (6th ed.1990); 42 C.J.S Indemnity § 2 (1991). It is based on the principle that everyone is responsible for his own wrongdoing, and if another person has been compelled to pay a judgment which ought to have been paid by the wrongdoer, then the loss should be shifted to the party whose negligence or tortious act caused the loss. 42 C.J.S. Indemnity at § 32. The obligation to indemnify may be express, as in a contractual provision, or may be implied in law, even in the absence of an indemnity agreement. Id. at § 29. An implied contract of indemnity arises only where the liability of the person seeking indemnification is solely constructive or derivative and only against one who, because of his act, has caused such constructive liability to be imposed. Bewley Furniture Co., Inc. v. Maryland Cas. Co., 285 So.2d 216, 219 (La.1973). Thus, because the party seeking indemnification must be without fault, a weighing of the relative fault of tortfeasors has no place in the concept of indemnity. Id.
In Minyard v. Curtis Prods., Inc., 251 La. 624, 205 So.2d 422, 431 (1967), this court considered the theoretical basis for recovery in an action for indemnity. In that case, a subcontractor installed a defectively manufactured caulking compound that he purchased through a distributor. Because of the defectiveness of the compound, remedial work was later required, and the subcontractor was bound to indemnify *186 the general contractor for the amount of the additional costs incurred. Subsequently, the subcontractor filed suit against the manufacturer of the defective product, seeking indemnity for the amounts he had been compelled to pay the general contractor. Although there was no contract of indemnification between the subcontractor and the manufacturer, the court allowed the subcontractor's claim for indemnity to proceed under the theory that the manufacturer, whose fault actually caused the loss, would be unjustly enriched if the loss remained upon the subcontractor. The court reasoned that an indemnity claim is a quasi-contractual obligation. As such, it is based upon the equitable principle that "where there is an unjust enrichment of one at the expense or impoverishment of another, then the value of that enrichment or else, in some cases, the amount of impoverishment must be restituted." Id. at 432.
The concept of indemnity and the equitable principles upon which such an action is based were further explained by this court in Bewley Furniture Co., Inc. v. Maryland Cas. Co., 285 So.2d 216, 219 (La.1973):
It has long been held in Louisiana that a party not actually at fault, whose liability results from the faults of others, may recover by way of indemnity from such others. The cases have referred to this imposed liability variously as technical, constructive, vicarious and derivative. This indemnity, or recovery over, has been allowed a contractor from his subcontractor and/or supplier, so long as the exclusive fault producing liability has been that of such subcontractor and/or supplier. (Citations omitted.)
The rule of indemnity enunciated in these cases is founded upon the general obligation to repair the damage caused by one's fault (La. Civ.Code art. 2315) and the moral maxim that "no one ought to enrich himself at the expense of another."
Applying similar concepts, the Supreme Court of Oklahoma, in United Gen. Ins. Co. v. Crane Carrier Co., 695 P.2d 1334 (Okla.1984), distinguished between an action for attorney fees and an action for indemnity. In that case, the court stated:
We therefore hold that where the jury returns its verdict in favor of the defendant third-party plaintiff against the third-party defendant for the full amount of the judgment awarded against the defendant third-party plaintiff, the defendant third-party plaintiff is not entitled to recover from the third-party defendant the attorney's fees expended in litigating the third-party action for the reason that the indemnitee cannot recover attorney fees ... in the absence of an express contract for such indemnification.
We likewise hold that the defendant third-party plaintiff is entitled to recover from the third-party defendant the attorney fees that the plaintiffs recover from the defendant under the general rules of indemnity that where a person who, without fault on his own part, has been compelled to pay damages occasioned by the primary negligence of another is entitled to indemnity from the latter, whether an express indemnity contract between the parties is in existence or not.
Id. at 1339.
Thus, it is clear from the jurisprudence that an action for indemnity is a separate substantive cause of action, independent of the underlying wrong, and distinct from an action for attorney fees. In light of the foregoing concepts, we conclude that the equitable principle of restitution applies in an action for indemnity to allow a defendant who is only technically or constructively liable for a plaintiffs loss to recover from the party actually at fault the attorney fees it was compelled to pay the plaintiff, even in the absence of a statute or contract of indemnification. This measure of relief is in accordance with the long standing principle that "[i]ndemnity *187 shifts the entire loss from a tortfeasor only technically or constructively at fault to one primarily responsible for the act that caused the damage." Green v. TACA Int'l Airlines, 304 So.2d 357, 359 (La.1974) (emphasis added).
Likewise, this reasoning is consistent with our decision in Maloney v. Oak Builders, 256 La. 85, 235 So.2d 386 (1970). In Maloney, a general contractor built a residence for the plaintiffs, which was subsequently found to contain defects. The plaintiffs sued the general contractor and recovered damages and attorney fees, as provided in the building contract and related surety bond. The general contractor asserted incidental demands against the subcontractors. However, the contracts between the general contractor and the subcontractors did not provide for attorney fees. The court of appeal found that the subcontractors' breach of their agreements with the general contractor was the true cause of the general contractor's liability to the plaintiffs. Because the general contractor had a right to rely on the performance of the subcontractors, the court of appeal awarded the general contractor full indemnity for the judgment, including the plaintiffs' attorney fees. This court affirmed the grant of full indemnity in favor of the general contractor, holding that each subcontractor was liable for his pro rata share of the attorney fees the general contractor was compelled to pay the plaintiffs. Id. at 392.
Krebs contends that Maloney is distinguishable from the present case, because it involved a claim for attorney fees based on contract. We disagree. In Maloney, there was a contract between the general contractor and the plaintiffs, which provided for attorney fees in the event of a breach. However, like the present case, there was no such agreement between the general contractor and the subcontractors, the parties actually at fault. Therefore, the general contractor's action against the subcontractors was based on indemnity, not contract. Because the sole cause of the general contractor's breach of its contract with the plaintiffs and its resulting liability for plaintiffs' attorney fees was the subcontractors' failure to perform as intended, this court concluded that the general contractor was entitled to recover, by way of indemnity, the attorney fees it was compelled to pay the plaintiffs' counsel.
In the present case, judgment was rendered in favor of Nassif and against Coast, awarding Nassif damages and attorney fees pursuant to La. Civ.Code art. 2545.[4] However, the judgment in the main demand was not brought about by any fault on the part of Coast. The true fault or cause of the damage Nassif sustained was the negligent work performed by Krebs. In this sense, Coast was only technically or constructively liable for Nassif's loss. Because Coast was exposed to liability and compelled to pay damages and statutory attorney fees on account of the negligent act of Krebs, an implied contract of indemnity arose in Coast's favor to prevent an unjust enrichment. In view of the rule that indemnity shifts the "entire loss" to the party who is actually at fault, we conclude that the obligation of Krebs to indemnify Coast includes the attorney fees Coast paid Nassif's counsel pursuant to the judgment in the main demand. The court of appeal erred in concluding otherwise. We must reverse.


*188 DECREE
For the reasons assigned, the judgment of the court of appeal is reversed insofar as it held that Coast Quality Construction Company was not entitled to indemnification for the attorney fees it paid Lowe, Stein, Hoffman, Allweiss and Hauver, L.L.P. The portion of the judgment of the district court ordering J.J. Krebs & Sons, Inc. to indemnify Coast Quality Construction Company for such attorney fees is reinstated. The judgment of the court of appeal is otherwise affirmed. All costs of the proceedings before this court are assessed against J.J. Krebs & Sons, Inc.
NOTES
[*]  Lemmon, J., not on panel. Rule IV, Part 2, § 3.
[1]  97-905 (La.App. 5th Cir. 10/28/98); 720 So.2d 452.
[2]  98-C-3193 (La.3/19/99); 739 So.2d 214.
[3]  99-C-0004 (La.3/19/99); 739 So.2d 782.
[4]  La. Civ.Code art. 2545 provides:

A seller who knows that the thing he sells has a defect but omits to declare it, or a seller who declares that the thing has a quality that he knows it does not have, is liable to the buyer for the return of the price with interest from the time it was paid, for the reimbursement of the reasonable expenses occasioned by the sale and those incurred for the preservation of the thing, and also for damages and reasonable attorney fees. If the use made of the thing, or the fruits it might have yielded, were of some value to the buyer, such a seller may be allowed credit for such use or fruits.
A seller is deemed to know that the thing he sells has a redhibitory defect when he is a manufacturer of that thing.
