
665 P.2d 256 (1983)
PIEDMONT EQUIPMENT COMPANY, INC., and Lumberman's Mutual Casualty Company, Appellants,
v.
EBERHARD MANUFACTURING COMPANY, Respondent.
No. 14132.
Supreme Court of Nevada.
June 22, 1983.
*257 Paul C. Parraguirre and Lorin D. Parraguirre, Las Vegas, for appellants.
David Goldwater and Gary E. Schnitzer, Las Vegas, for respondent.

OPINION
MOWBRAY, Justice:
Appellants Piedmont Equipment Company (Piedmont) and Lumberman's Mutual Casualty Company (Lumberman's) seek indemnification from respondent Eberhard Manufacturing Company (Eberhard) for litigation expenses incurred in defending a products liability action. At the jury trial on the products liability claims Eberhard was held liable to the plaintiff, but Piedmont was exonerated of liability.
Piedmont had, in the principal suit, cross-claimed against Eberhard seeking indemnification. The court below denied Piedmont's indemnification claim. We reverse the judgment of the district court, and remand for an apportionment of the litigation expenses consistent with the views expressed in this opinion.

THE FACTS
The facts in this matter are undisputed. Appellant Piedmont and respondent Eberhard were defendants in a major products liability action brought in 1973 by the parents of Daniel Craig Baldwin, a minor. Daniel had been injured in 1972 when he came into contact with an open high voltage electrical fuse box owned by Nevada Power Company. Eberhard had designed and manufactured a locking mechanism for the fuse box door. Piedmont was the distributor who had supplied the Eberhard locking mechanism to the manufacturer of the fuse box. The Baldwins sued on grounds of negligence, strict liability, and breach of warranty against all defendants.
Soon after the Baldwins added Piedmont and Eberhard to their complaint as defendants, Piedmont cross-claimed against Eberhard for indemnification of any recovery the Baldwins might obtain, plus costs and attorney's fees. Piedmont alleged that it was entitled to be defended by Eberhard, and also requested by letter that Eberhard assume its defense. Eberhard denied that Piedmont was entitled to indemnification, and did not accept Piedmont's tender of its defense.
On August 4, 1977, the jury rendered a verdict of more than $800,000 in the plaintiffs' favor against all defendants except Piedmont, which received a favorable verdict. The case had been submitted to the jury against Nevada Power Company on a negligence theory and against all other defendants on a theory of strict liability.
*258 The district court denied the Baldwins' motion for judgment notwithstanding the verdict as against Piedmont, and also denied Eberhard's motion for a new trial. Eberhard appealed to this Court on the ground that the jury verdicts were inconsistent. We held that Eberhard had waived the issue because it had not objected at the time the verdicts were returned; we therefore did not reach the question of whether the verdicts were inconsistent. See Eberhard Mfg. Co. v. Baldwin, 97 Nev. 271, 628 P.2d 681 (1981).
On January 14, 1982, after the above affirmance, Piedmont amended its crossclaim against Eberhard to include Lumberman's as a cross-claimant. Lumberman's was Piedmont's liability insurance carrier. It had paid for Piedmont's costs and attorney's fees in the products liability action. They together moved for summary judgment against Eberhard, seeking indemnification of these litigation expenses. Eberhard then cross-moved for summary judgment, asserting as a matter of law that Piedmont was not entitled to recover its litigation expenses because it had been defending for its own benefit rather than for the benefit of another. After a hearing the district court granted Eberhard's cross-motion for summary judgment. This appeal followed.

ATTORNEY'S FEES AVAILABLE IN INDEMNITY
There is a split of authority regarding whether a party otherwise entitled to indemnity for the primary plaintiff's recovery may recover from the indemnitor the reasonable attorney's fees and costs incurred in defending the primary tort action. One line of authority reasons from basic implied indemnity principles to include attorney's fees and costs in the recovery to which the indemnitee is entitled from the indemnitor. The other line of authority is more restrictive; it creates only a minor exception to the general rule that each party to a lawsuit is responsible for his or her own litigation expenses.
The more restrictive jurisdictions follow the rule of Westfield v. Mayo, 122 Mass. 100, 23 Am.Rep. 292 (1877). The court in Westfield held that, where an indemnitee tenders his defense to an indemnitor at the start of litigation and the tender is refused, and the indemnitee then defends solely and exclusively the acts of the indemnitor rather than any misfeasance of his own, the indemnitor becomes liable not only for the damages paid by the indemnitee to the plaintiff, but also for all reasonable and necessary litigation expenses incurred by the indemnitee. 122 Mass. at 105.
Most of the jurisdictions following Westfield have refused to compel manufacturers to pay attorney's fees to otherwise indemnified suppliers and distributors who have defended against allegations that they were independently liable for negligence or breach of warranty. The courts reason that where the plaintiff alleges that each defendant member of the distribution chain is independently liable, each such defendant is defending for its own benefit rather than for the benefit of the indemnitor. The courts have held that under such circumstances the indemnitor is under no duty to defend the indemnitee, and the general rule precluding an award of attorney's fees absent a statute or contract applies. See, e.g., Weston v. Globe Slicing Machine Co., 621 F.2d 344 (9th Cir.1980) (interpreting Idaho law); David v. Air Tech. Industries, Inc., 22 Cal.3d 1, 148 Cal. Rptr. 419, 582 P.2d 1010 (Cal. 1978); Farr v. Armstrong Rubber Co., 288 Minn. 83, 179 N.W.2d 64 (Minn. 1970); Krug v. Sterling Drug, Inc., 416 S.W.2d 143 (Mo. 1967); Conrad v. Suhr, 274 N.W.2d 571 (N.D. 1979); Shaffer v. Honeywell, Inc., 249 N.W.2d 251 (S.D. 1976).
Several jurisdictions have departed from the Westfield rule, instead relying on basic indemnity principles to allow an indemnitee to recover attorney's fees and court costs from the indemnitor under certain circumstances. These courts reason that there is no distinction between indemnity actions arising out of contract provisions and those that are implied in law, holding that in either case reasonable attorney's fees and costs incurred in resisting the claim indemnified *259 against may be recovered as part of the indemnitee's damages, so long as the indemnitee is free from active wrongdoing regarding the injury to the plaintiff and has tendered the defense to the indemnitor at the start of the litigation. See, e.g., Heritage v. Pioneer Brokerage & Sales, Inc., 604 P.2d 1059 (Alaska 1979); Sendroff v. Food Mart of Connecticut, Inc., 34 Conn. Supp. 624, 381 A.2d 565 (Conn.Super. 1977); Pender v. Skillcraft Industries, Inc., 358 So.2d 45 (Fla.App. 1978); St. Paul Fire & Marine Ins. Co. v. Crosetti Bros., Inc., 256 Or. 576, 475 P.2d 69 (Or. 1970). See also Litton Systems, Inc. v. Shaw's Sales & Service, Ltd., 119 Ariz. 10, 579 P.2d 48, 50-52 (Ariz. App. 1978); Boudreau v. General Elec. Co., 2 Hawaii App. 10, 625 P.2d 384, 390 (Hawaii App. 1981); Massingale v. Northwest Cortez, Inc., 27 Wash. App. 749, 620 P.2d 1009, 1012 (Wash. App. 1980).
In Pender v. Skillcraft Industries, supra, the defendant retail seller of a defective clamp-on light, which had contributed to the electrocution of the plaintiff's son, sought indemnification from the defendant manufacturer of the light for attorney's fees and the costs of defending itself in the primary action. The factfinder found the manufacturer liable, but exonerated the retailer of liability. There was no evidence that the retailer knew or should have known of the latent defect in the light. On appeal, the court held that if a retailer, who is not an active wrongdoer according to the evidence at trial, would have been entitled to indemnity from a manufacturer for a judgment against the retailer resulting from the latter's sale of a defective product, the retailer is entitled to be indemnified for the costs and fees incurred in defending itself in the primary action. 358 So.2d at 46-47. See Insurance Co. of North America v. King, 340 So.2d 1175, 1176 (Fla.App. 1976). Evidence supporting only passive negligence, breach of implied warranty, or strict liability is insufficient to establish "active wrongdoing." See 358 So.2d at 46. Said the court,
[o]ur holding should not be construed to open a floodgate for cross-claims seeking indemnification when there is no connection between the cross-claimant and the party from whom indemnification is sought. Some nexus is required to support an implied contract theory of indemnification. In the present case there was clearly privity of contract between the manufacturer and the retailer of the defective clamp-on light.
Id. at 47.
We are inclined to follow the reasoning in Pender. As the Comment to Section 886B of the Restatement (Second) of Torts notes, the basis for indemnity is restitution; one person is unjustly enriched when another discharges liability that it should be his responsibility to pay. The premise is that indemnity should be granted in any situation where, as between the parties themselves, it is just and fair that the indemnitor should bear the entire loss, rather than leaving it on the indemnitee or dividing it proportionately between the parties by contribution. An indemnitee is not "held harmless" pursuant to an express or implied indemnity agreement if it must incur costs and attorney's fees to vindicate its rights. Heritage v. Pioneer Brokerage & Sales, Inc., 604 P.2d at 1066-67. Furthermore, the more restrictive Westfield rule provides absolutely no protection to retailers and distributors, who may be compelled to expend large sums to defend a products liability action merely because a defective product, the defect of which may be attributable solely to the manufacturer's conduct, passed through their hands.
Moreover, the jurisdictions which follow the Westfield rule rely on the allegations in the plaintiff's complaint to determine whether the indemnitee is entitled to costs and attorney's fees from the indemnitor; only if the indemnitee is defending solely and exclusively against allegations of the indemnitor's wrongful conduct may he recover such expenses. Such a restriction may prove very damaging to retailers and distributors. It does not require any legal ingenuity to draft a complaint charging someone with negligence, and no evidence is needed to support such an allegation. See *260 Conrad v. Suhr, 274 N.W.2d 571, 580 (N.D. 1979) (Sand, J., specially concurring). The right to indemnification for litigation expenses should not depend on the pleading choices of a third party, who through an excess of caution or optimism may allege far more than he can prove at trial. Peters v. Lyons, 168 N.W.2d 759, 770 (Iowa 1969).
We agree with the viewpoints expressed in Pender, Peters, and Heritage v. Pioneer Brokerage & Sales. We therefore hold that where an indemnitee would be entitled to recover from an indemnitor the amount of a judgment paid to the plaintiff, as determined by the facts as found by the trier of fact, the indemnitee is entitled to recover in indemnity at least some of the attorney's fees and court costs incurred in defending the primary action.
However, the right to fees and costs remains limited. The manufacturer has no duty to defend a distributor or retailer charged with negligence, breach of warranty, or strict liability where the latter party is attempting to prove that it was not actively negligent. See Koch v. City of Seattle, 9 Wash. App. 580, 513 P.2d 573, 576-77 (Wash. App. 1973). Cf. Restatement (Second) of Judgments § 57(2) & (3) (1982) ("conflict of interest" preventing indemnitor from properly assuming defense of indemnitee exists when injured person's claim against indemnitee is such that it could be sustained on different grounds, one of which is within scope of indemnitor's obligation to indemnify and another of which is not). Therefore, the indemnitee's right to attorney's fees and costs depends on the evidence presented as well as the facts found at trial; the indemnitee may recover only those fees and expenses attributable to the making of defenses which are not primarily directed toward rebutting charges of active negligence.[1]
In the instant case, Piedmont was in privity with Eberhard, and tendered its defense at the start of the litigation. Although the plaintiff's complaint alleged that each of the several defendants, including Piedmont, was liable for conduct involving negligence, strict liability, and breach of warranty, Piedmont was exonerated of liability at trial. On these facts, Piedmont may be entitled to indemnity from Eberhard for attorney's fees and costs incurred in defending the primary action, insofar as such expenses related to the preparation and presentation of evidence and arguments that were not primarily directed toward rebutting charges of active negligence. We therefore reverse the judgment of the district court and remand the matter to the district court for an appropriate apportionment of litigation expenses.
MANOUKIAN, C.J., and SPRINGER, STEFFEN and GUNDERSON, JJ., concur.
NOTES
[1]  To avoid problems of post-trial apportionment, the manufacturer may arrange with the party seeking indemnification to take over only a part of the defense, e.g., to defend only until it reasonably appeared that the indemnitee was actively negligent. Alternatively, the manufacturer could arrange to pay an equitable portion of the litigation expenses rather than assume any part of the defense. Koch v. City of Seattle, supra. See Hales v. Monroe, 544 F.2d 331 (8th Cir.1976).
