
83 Cal.Rptr.2d 192 (1999)
70 Cal.App.4th 1030
WILSON, McCALL & DAORO et al. Cross-complainants, Cross-defendants, and Appellants,
v.
AMERICAN QUALIFIED PLANS, INC, Cross-defendant, Cross-complainant and Appellant.
No. A078295.
Court of Appeal, First District. Division 5.
March 19, 1999.
*193 Murphy, Pearson, Bradley & Feeney, Arthur V. Pearson, Anne F. Marchant, San Francisco, for Wilson, McCall & Daoro et al., Cross-complainants, Cross-defendants and Appellants.
Trucker Huss, R. Bradford Huss, Robert S. Unger, San Francisco, for American Qualified Plans, Inc., Cross-defendant, Cross-complainant and Appellant.
Certified for Partial Publication.[1]
HANING, J.
Wilson, McCall & Daoro, a certified public accounting partnership, and Robert R. Daoro (hereafter collectively Wilson) appeal a summary judgment in favor of American Qualified Plans, Inc. (AQP), in Wilson's crossaction for indemnity. AQP appeals a summary judgment in favor of Wilson in AQP's cross-action for indemnity, contending the court erred in determining AQP was not entitled to attorney fees under Code of Civil Procedure[2] section 1021.6. AQP also appeals a subsequent order denying its motion for attorney fees under section 1038.

BACKGROUND
In February 1994 Ben A. Trainer (Trainer) filed a professional negligence action against Wilson and the law firm of Stanton & Ballsun and one of its partners, Kathryn A. Ballsun (hereafter collectively Stanton), alleging they failed to advise him that California tax law did not conform with federal tax law regarding the sale of stock to an employee stock ownership plan (ESOP). As a result, Trainer's gain from the sale of his stock to the ESOP was fully taxable under California law, and he was assessed state taxes and interest in excess of $458,000. Trainer and Stanton are not parties to this appeal.
Stanton and Wilson filed separate crosscomplaints for indemnity and declaratory relief against each other and AQP, a consulting firm which consults with companies concerning ESOP's and administers such plans. The Stanton and Wilson cross-complaints alleged that if they (i.e., Wilson in one instance or Stanton in the other) were found liable, such liability resulted from AQP's failure to properly advise Trainer of the state tax consequences of selling his stock to the ESOP.
AQP responded in part by cross-complaining against Wilson and Stanton for indemnity and seeking attorney fees under section 1021.6, alleging that Wilson rejected AQP's tender of the defense of Stanton's crosscomplaint and Stanton rejected AQP's tender of the defense of Wilson's cross-complaint.
AQP then moved for summary judgment on both the Stanton and Wilson cross-complaints on the ground that it had no duty to Trainer and therefore no liability on the Wilson and Stanton cross-complaints. AQP did not seek attorney fees or costs in that motion.
The court granted AQP's summary judgment motion against Wilson and Stanton after determining there were no triable issues of fact as to the following: (1) there was no contractual relationship between Trainer and AQP; (2) AQP was neither retained by, nor gave Trainer any tax, legal or financial advice *194 about the ramifications of his stock sale to the ESOP; (3) Trainer did not seek any such advice from AQP; (4) Trainer did not rely on AQP in determining to sell stock to the ESOP; (5) no information from AQP affected Trainer's decision to sell stock to the ESOP; and (6) AQP made no misrepresentation to Trainer or his company, Med-Tech West, Inc. (Med-Tech).
AQP then settled its cross-complaint against Stanton. Pursuant to the settlement agreement Stanton agreed to pay AQP $30,-000 against $126,000 AQP alleged it had incurred in attorney fees. The court found the settlement amount to be in good faith (§ 877.6), but expressly refrained from approving any characterization of the settlement funds as payment for fees incurred by AQP pursuant to section 1021.6.
Thereafter, Wilson moved for summary judgment on AQP's cross-complaint on the grounds that AQP was not entitled to attorney fees under section 1021.6 because it never paid a judgment or settlement nor was obligated to do so, and AQP never brought or defended an action against a third party. The court granted Wilson's motion for summary judgment, reasoning that AQP never paid a judgment or settlement in the litigation, was never adjudicated a joint tortfeasor, and did not bring or defend an action against a third party within the meaning of section 1021.6. The court said that if Trainer had named AQP in its complaint as an additional defendant, section 1021.6 would apply.
Thereafter, AQP unsuccessfully moved for attorney fees under section 1038. The court denied the motion on the grounds that it was untimely, and that AQP failed to demonstrate Wilson pursued its cross-complaint against it in bad faith and/or without reasonable cause.

DISCUSSION

I[*]

II

AQP Appeal

A.
AQP contends it is entitled to attorney fees under section 1021.6, arguing that due to Wilson's negligence it (AQP) was required to defend, at its own expense, Stanton's cross-complaint for indemnity when Wilson refused to defend it.
Wilson rejoins that section 1021.6 is inapplicable to AQP because it did not prevail on its claim against Stanton for implied indemnity, and was not sued by Trainer or found to be without fault in Trainer's action, which Wilson characterizes as the "principal case." Wilson further claims that section 1021.6 is inapplicable to AQP because "AQP was never required to bring an action against or defend an action brought by a third person (such as [Trainer])." (Boldface omitted.) Wilson argues that because AQP alleged in its crosscomplaint that Wilson and Stanton were joint tortfeasors, there was no "third person" within the meaning of section 1021.6. Finally, Wilson contends AQP is not entitled to section 1021.6 fees because it never paid a judgment or settlement and was never adjudicated to be a joint tortfeasor in the litigation.
Section 1021.6 provides: "Upon motion, a court after reviewing the evidence in the principal case may award attorney's fees to a person who prevails on a claim for implied indemnity if the court finds (a) that the indemnitee through the tort of the indemnitor has been required to act in the protection of the indemnitee's interest by bringing an action against or defending an action by a third person and (b) if that indemnitor was properly notified of the demand to bring the action or provide the defense and did not avail itself of the opportunity to do so, and (c) that the trier of fact determined that the indemnitee was without fault in the principal case which is the basis for the action in indemnity or that the indemnitee had a final judgment entered in his or her favor granting a summary judgment. ..."
Where the construction of a statute is at issue on review of a summary judgment, we independently review the statute to determine the validity of the judgment. (County *195 of Alameda v. Pacific Gas & Electric Co. (1997) 51 Cal.App.4th 1691, 1698, 60 Cal. Rptr.2d 187.) Section 1021.6 codifies an exception to the general rule of section 1021 that each party must bear its own attorney fees unless otherwise provided by statute or contract. (John Hancock Mutual Life Ins. Co. v. Setser (1996) 42 Cal.App.4th 1524, 1531, 50 Cal.Rptr.2d 413 (John Hancock); Fidelity Mortgage Trustee Service, Inc. v. Ridgegate East Homeowners Assn. (1994) 27 Cal.App.4th 503, 512, 32 Cal.Rptr.2d 521 (Fidelity Mortgage).)
Section 1021.6 was enacted in 1979 in response to the California Supreme Court's decision in Davis v. Air Technical Industries, Inc. (1978) 22 Cal.3d 1, 5-8, 148 Cal. Rptr. 419, 582 P.2d 1010 (Davis), a product liability action in which the manufacturer and retailer of an elevator were sued by an injured third party. (See John Hancock, supra, 42 Cal.App.4th at p. 1532, 50 Cal.Rptr.2d 413; Fidelity Mortgage, supra, 27 Cal. App.4th at p. 513, 32 Cal.Rptr.2d 521; see also, Review of Selected 1982 Legislation (1983) 14 Pacific L.J. 743.) The Davis plaintiff alleged causes of action against both defendants for negligence, breach of express warranty, and strict liability. The retailer tendered its defense of the action to the manufacturer, who refused to defend the retailer. The manufacturer defended against the defective design claims and the retailer defended only against the allegations of its own negligence and breach of warranty. After the trial court granted the retailer's motion for nonsuit on the breach of warranty claim, the plaintiff voluntarily dismissed the negligence claim and the jury found both defendants strictly liable. On the retailer's cross-complaint for indemnity against the manufacturer the trial court ordered the manufacturer to indemnify the retailer for the amount of the plaintiffs damages and attorney fees incurred in its defense of the main action. The Supreme Court reversed, holding that the retailer was not entitled to indemnification for its attorney fees because it incurred them solely in defense of its own negligence. (Davis at pp. 3-6, 148 Cal. Rptr. 419, 582 P.2d 1010.)
Justice Mosk dissented in Davis, arguing that the facts should have been analyzed under the "tort of another" doctrine: "`A person who through the tort of another has been required to act in the protection of his interests by bringing or defending an action against a third person is entitled to recover compensation for the reasonably necessary loss of time, attorney's fees, and other expenditures thereby suffered or incurred. [Citations.]' " (Davis, supra, 22 Cal.3d at p. 10, 148 Cal.Rptr. 419, 582 P.2d 1010, italics added in Davis (dis. opn. of Mosk, J.) quoting Prentice v. North Amer. Title Guar. Corp. (1963) 59 Cal.2d 618, 620, 30 Cal.Rptr. 821, 381 P.2d 645.)
Section 1021.6 authorizes attorney fees to "any `innocent indemnitee' who has incurred attorney fees to defend itself and has otherwise satisfied the requirements of section 1021.6." (John Hancock, supra, 42 Cal. App.4th at p. 1533, 50 Cal.Rptr.2d 413, original italics, citing Fidelity Mortgage, supra, 27 Cal.App.4th at p. 514, 32 Cal.Rptr.2d 521.) In this case both Wilson and Stanton crosscomplained for indemnity against AQP. After Wilson refused to defend AQP against Stanton's cross-complaint for indemnity, AQP was forced to defend itself, and ultimately prevailed by summary judgment against Stanton's cross-complaint.
Based on this scenario, we conclude section 1021.6 applies to AQP's claim for attorney fees against Wilson. A cross-complaint is a separate pleading, based on an independent cause of action. It must be drawn with the same completeness and sufficiency of allegations as the complaint on an independent cause of action. (Asamen v. Thompson (1942) 55 Cal.App.2d 661, 674, 131 P.2d 841; 5 Witkin, Cal. Procedure (4th ed. 1997) Pleading, § 1089, p. 543.) The crosscomplainant is akin to a plaintiff and the cross-defendant is akin to a defendant.
Although Wilson urges otherwise, section 1021.6's reference to the "principal case"-does not necessarily mean the original action filed by the plaintiff. Instead, "principal" refers to the action which caused the innocent indemnitee to defend itself and thereby incur attorney fees, as distinguished from the indemnitee's action for indemnity in *196 which the section 1021.6 fees are sought. The "principal case" for AQP for purposes of section 1021.6 is Stanton's cross-complaint against AQP which, due to Wilson's tort, AQP was required to defend to protect its interest. Nothing in the language of section 1021.6, or the cases discussing it, suggests that AQP must be sued by Trainer in his action against Wilson and Stanton or found without fault therein as a predicate to receiving section 1021.6 fees.
Wilson also argues that the "third person" requirement of section 1021.6 is not satisfied because AQP "merely defended" cross-complaints by Wilson and Stanton. Wilson suggests that this conclusion follows from the "plain words of [section 1021.6]" and the fact that the cases interpreting section 1021.6 happen to be ones in which the party seeking attorney fees has been "named in the principal [case]." (Underscoring omitted.)
As we explained above, from AQP's perspective, the "principal case" was the crosscomplaint for indemnity brought by Stanton. That action was separate and distinct from the cross-complaint for indemnity Wilson filed against AQP. That AQP's cross-complaint for indemnity against Wilson and Stanton alleged they were joint tortfeasors does not suggest they were a single entity. AQP was forced to defend itself against Stanton's indemnity cross-action due to Wilson's tortious conduct. Stanton is therefore a "third person" within the meaning of section 1021.6.
Wilson also contends that because AQP never paid a judgment or settlement and was never adjudicated to be a joint tortfeasor in the litigation, it should be precluded from recovering fees under section 1021.6. A similar issue was rejected by the Supreme Court in Bay Development, Ltd. v. Superior Court (1990) 50 Cal.3d 1012, 1026-1027, 269 Cal.Rptr. 720, 791 P.2d 290 (Bay Development).
Bay Development involved an action for fraudulent misrepresentation by condominium unit owners against the limited partnership condominium development owner (Bay) and its general partner (Bowen). Bay and Bowen then cross-complained for indemnity against the property's former owner (Home), and the plaintiffs amended their complaint to name Home as a defendant. Home settled with the plaintiffs in exchange for the plaintiffs' dismissal of all claims against it, and the court determined the settlement was in good faith (§ 877.6), thus barring Bay and Bowen's indemnity claims. (Bay Development, supra, 50 Cal.3d at pp. 1020-1023, 269 Cal. Rptr. 720, 791 P.2d 290.) While Bay and Bowen's petition for extraordinary relief was pending in the Court of Appeal, the plaintiffs' action against Bay and Bowen was tried and the jury found in favor of Bay and Bowen. (Id. at p. 1026, 269 Cal.Rptr. 720, 791 P.2d 290.)
Before addressing the major issue of whether a settling defendant remains liable to other defendants for implied contractual indemnity, Bay Development addressed the threshold procedural issue of whether the fact that Bay and Bowen were found to have no liability mooted their claim for indemnity. (Bay Development, supra, 50 Cal.3d at p. 1026, 269 Cal.Rptr. 720, 791 P.2d 290.) The Supreme Court first noted that despite not having to pay damages to the plaintiffs, Bay and Bowen had a substantial economic interest in going forward with their indemnity claim because they sought to recover under section 1021.6 the attorney fees they expended in defending the initial action. (Id. at pp. 1026-1027, 269 Cal.Rptr. 720, 791 P.2d 290.) Citing Uniroyal Chemical Co., Inc. v. American Vanguard Corp. (1988) 203 Cal.App.3d 285, 291-297, 249 Cal.Rptr. 787 (Uniroyal), Bay Development stated, "a would-be indemnitee may be eligible to recover attorney fees under section 1021.6 even whenagain, as herethe indemnitee has been absolved of all liability for the plaintiffs injuries, so long as the indemnitee demonstrates it would have been entitled to indemnity for any judgment that had been rendered against it." The Supreme Court determined that if the trial court erred in dismissing Bay and Bowen's claim for indemnity against Home, Bay and Bowen would be entitled to pursue that claim and seek attorney fees under section 1021.6. (Ibid.)
Wilson's attempt to distinguish Bay Development and Uniroyal on the ground that the indemnitees in those cases were actually *197 named defendants in the actions filed by the plaintiffs fails for reasons previously discussed. The Bay Development rationale which permits an indemnitee who has been absolved of all liability to seek fees under section 1021.6 is applicable here.
For all the reasons stated, the trial court erred in determining, as a matter of law, that AQP is not entitled to attorney fees under section 1021.6. Of course, upon remand AQP will have to establish that Stanton's action against it arose from the tortious conduct of Wilson.

B.[**]

DISPOSITION
The summary judgment in favor of Wilson is reversed and the matter is remanded with directions to entertain AQP's motion for attorney fees under section 1021.6. The order denying AQP attorney fees pursuant to section 1038, and the summary judgment in favor of AQP are affirmed. Each party to bear its own costs on appeal.
JONES, P.J., and CHAMPLIN,[***] J., concur.
NOTES
[1]  Pursuant to California Rules of Court, rule 976.1, parts I and IIB. of this opinion are not certified for publication.
[2]  All further section references are to the Code of Civil Procedure.
[*]  See footnote I, ante.
[**]  See footnote I, ante.
[***]  Judge of the Superior Court of Napa County, assigned by the Chief Justice pursuant to article VI, section 6, of the California Constitution.
