*1232A subcontractor is hired by a developer to install utility boxes in a subdivision. The subcontract contains a clause requiring the subcontractor to indemnify the developer for all claims arising out of the subcontractor's work.**
*576A plaintiff in an underlying tort action brings an action against the subcontractor and the developer for injuries allegedly arising from the subcontractor's work. The subcontractor does not defend the developer.
The trial court submits the question of the subcontractor's duty to defend to a jury. The jury finds the plaintiff's injuries were not caused by the subcontractor's work. Does this end the matter? No.
The end of the trial is not the end of the case. The parties are back to the beginning on the issue of duty to defend. Why? Where plaintiff in an underlying tort action alleges that his injuries arose out of the subcontractor's work, the developer is entitled as a matter of law to a defense under the indemnity clause. It is error to submit the question of the subcontractor's duty to defend to a jury.** We reverse and remand.
*1233FACTS
Centex Homes (Centex) contracted with R-Help Construction Company, Inc. (R-Help) to trench, install and inspect all utility boxes and conduits for the Novella residential construction project in the City of Thousand Oaks (City). The contract required R-Help to defend and indemnify Centex for all claims "to the extent such Claim(s) in whole or in part arise out of or relate to" R-Help's work. The contract provided for attorney fees incurred in enforcing the indemnity agreement.**
Matthias Wagener filed a civil complaint against Southern California Edison and others alleging he was injured when he fell into a utility box. The complaint alleged that the defendants negligently managed, maintained, and inspected the utility box cover so as to create an unstable platform. Centex and R-Help were later added as Doe defendants.
In answering R-Help's interrogatories, Wagener stated: "It appears as though R-Help installed and thereafter abandoned the subject junction box or hand hole and adjoining conduit, having installed the lid without the prescribed bolts specifically designed to keep the SCE lid bolted to the junction box. Acting as Centex'[s] agent, R-Help and Centex are both jointly and severally liable to plaintiff for the injuries he suffered and damages he sustained." (Italics omitted.)
Centex tendered the complaint to R-Help for defense and indemnity. R-Help did not respond to the tender.
Centex filed a cross-complaint against R-Help alleging causes of action for breach of contract, indemnity, and declaratory relief. Centex sought costs and expenses incurred in defending Wagener's action and in enforcing the indemnity agreement.
Eventually Centex obtained a dismissal of the Wagener action pursuant to a settlement. Wagener settled his action with the remaining defendants, leaving Centex's cross-complaint against R-Help to be decided.
Centex moved for summary adjudication contending that the allegations of Wagener's complaint alone require R-Help to defend Centex under the indemnity agreement as a matter of law. R-Help moved for summary judgment contending undisputed evidence shows the utility box on which *1234Wagener was injured is outside the scope of R-Help's work under the subcontract. The trial court denied both motions.
[[/]]***
After pretrial motions in limine, the trial court determined the question of indemnity is for the jury.***
*577Trial
A Centex manager and an expert testified for Centex at trial.
Jerry Domke was the senior land development manager for Centex. He has a degree in civil engineering and decades of experience working for public entities, private engineering firms, and real estate developers. He worked for Centex from 2003 to 2007. He was involved in contracting for the Novella project. Domke testified that R-Help contracted to install all the utility boxes for the dry utilities; that is, telephone, electrical, and cable. The box on which Wagener was injured is shown on the City's conduit plan, and is included in the scope of R-Help's work under its subcontract. A change order adjusting the location of the box reflects that R-Help worked on it.
Henry Koffman has a master's degree in civil engineering and is professor of construction engineering and management at the University of Southern California. He testified the utility box on which Wagener was injured was on the plans for the project. It was on the City's conduit plan. The box on which Wagener was injured was the same model box as another box installed on the project by R-Help. He said no one but R-Help would want to install a box at that location.
Roberto Hurtado, president of R-Help, and the Novella project foreman inspected the subject utility box. They determined the box was not the work of R-Help and was not on the project's plans. They concluded it was not within R-Help's scope of work under the subcontract.
The trial court instructed the jury: "R-HELP CONSTRUCTION CO. had a duty under the contract to defend and pay for the defense of CENTEX
*1235HOMES upon a tender of the defense if CENTEX proves that WAGENER's alleged injuries, in whole or in part, arose out of or related to the work performed by R-HELP, unless the information available to both parties at the time of the tender eliminated any reasonable potential that the WAGENER claim arose out of or was related to R-HELP's work. [¶] Whether the WAGENER claim against CENTEX and R-HELP succeeded is not determinative of the duty to defend."
Pursuant to the instruction, the trial court gave the jury a special verdict form that included the following questions: "Question No. 1 : Did WAGENER allege that his injuries in whole or in part arose out of or were related to R-HELP's work? [¶] ... [¶] Question No. 2 : Did the information available to both parties at the time of the tender eliminate any reasonable potential that the allegations in WAGENER's claim arose out of or were related to R-HELP's work?"
The jury answered yes to both questions.
The trial court found that R-Help did not breach the contract by failing to obtain insurance.
The trial court entered judgment in favor of R-Help.
Post Trial
Centex moved for a new trial.† The trial court denied Centex's motion for a new trial on the issue of indemnity.†
DISCUSSION
Centex's Appeal
I
Centex contends the trial court improperly delegated the duty to defend issue *578to the jury. It claims the issue is one of law for the court. We agree. *1236Centex argues Wagener's allegation that the utility box was within the scope of work R-Help performed for it is alone sufficient to require R-Help to defend. Centex relies on Crawford v. Weather Shield Mfg., Inc. (2008) 44 Cal.4th 541, 79 Cal.Rptr.3d 721, 187 P.3d 424. In Crawford , the developer of a residential project subcontracted with a window manufacturer to supply windows for the project. The subcontract required the window manufacturer to indemnity the developer against all claims arising out of the manufacturer's work. Homeowners sued the developer alleging the windows manufactured by the subcontractor were faulty. The developer tendered defense to the manufacturer under the indemnity provisions in the subcontract. Our Supreme Court held that the duty to defend claims embraced by the indemnity agreement arises immediately upon the proper tender of defense, and thus before the litigation has determined whether indemnity is actually owed. ( Id. at p. 558, 79 Cal.Rptr.3d 721, 187 P.3d 424.) Claims on which a duty to defend is owed include those which at the time of tender allege facts that would give rise to a duty of indemnity. ( Ibid. )
Here Wagener claimed his injuries arose out of or related to R-Help's work for Centex. Under Crawford , the duty to defend arose immediately upon the proper tender of defense of a claim embraced by the indemnity agreement. ( Crawford v. Weather Shield Mfg., Inc. , supra , 44 Cal.4th at p. 558, 79 Cal.Rptr.3d 721, 187 P.3d 424.) The duty to defend was not a question of fact for the jury; the trial court was compelled to determine as a matter of law that Wagener's claim was embraced by the indemnity agreement.
R-Help attempts to distinguish Crawford on the ground that there the question giving rise to indemnity was whether the window manufacturer was negligent. The resolution of that question lies in the underlying tort action. R-Help argues that here the question of the scope of work under the subcontract may be resolved independently of the underlying tort action. But the scope of work was an issue in the underlying tort action here, as was negligence in Crawford . Under Crawford , the duty to defend arises as a matter of law from the mere allegation in the underlying tort action that plaintiff's injuries arose out of R-Help's work.
Crawford suggests that the obligation to defend may not continue "if the promisor ... conclusively established that the claims were not among those 'embraced by the indemnity.' " ( Crawford v. Weather Shield Mfg., Inc. , supra , 44 Cal.4th at p. 558, fn. 7, 79 Cal.Rptr.3d 721, 187 P.3d 424.) In Montrose Chemical Corp. v. Superior Court (1993) 6 Cal.4th 287, 298, 24 Cal.Rptr.2d 467, 861 P.2d 1153, an insurance case on which both parties rely, our Supreme Court stated: "It would be pointless ... to require an insurer to defend an action where undisputed facts developed early in the investigation conclusively showed, despite a contrary allegation in the complaint, that the underlying acts occurred on a date when the policy was not in effect or at a location concededly not covered by the policy."
*1237But where the plaintiff's complaint alleges facts embraced by the indemnity agreement, the indemnitor has a duty to defend throughout the underlying tort action unless it can conclusively show by undisputed facts that plaintiff's action is not covered by the agreement.
R-Help attempted to show conclusively by undisputed evidence in its motion for summary judgment that Wagener's action was not covered by the indemnity agreement. R-Help failed to do so.
*579R-Help's reliance on Morlin Asset Management LP v. Murachanian (2016) 2 Cal.App.5th 184, 206 Cal.Rptr.3d 195 is misplaced. In Morlin , plaintiff sued a landlord for injuries that occurred in the common area of an office building. Landlord cross-complained against a tenant under an indemnity agreement in the tenant's lease. The tenant obtained summary judgment on the ground that under the indemnity clause he was only liable to indemnity for injuries that occurred within his suite, not the common area. The Court of Appeal affirmed.
In Morlin , unlike this case, the allegations of the complaint in the underlying tort case were not embraced by the terms of the indemnity agreement. Moreover, the tenant in Morlin was able to show conclusively by undisputed evidence that the indemnity agreement did not apply. Here R-Help could not so demonstrate. Thus, the trial court denied R-Help's motion for summary judgment.
R-Help argues there is no substantial evidence that installation of the utility box was within its scope of work. R-Help attempts to support its argument by attacking the credibility of Centex's witnesses.
Centex's development manager Domke is a civil engineer with decades of experience. He testified that R-Help contracted to install all the utility boxes for the project. He said the box on which Wagener was injured was within R-Help's scope of work as shown on the City's conduit plan and as reflected in a change order. Centex's expert Koffman also testified that installation of the box was within R-Help's scope of work.
R-Help challenges Domke's and Koffman's testimony by pointing to the cross-examination tending to show that the box in question was not installed according to the City's plans and specifications and had no function as installed. It is not unusual in the history of real estate development that someone who contracted to install an item failed to install it according to the plans and specifications so that it had no function as installed. None of the evidence elicited on cross-examination definitively shows the box was not within R-Help's scope of work or that R-Help did not install the box.
*1238Domke's and Koffman's testimony constitutes substantial evidence that could be found credible by a reasonable trier of fact even though that did not happen here.
In any event, it is too late to challenge the duty to defend after the underlying tort case has been resolved. Our Supreme Court stated in Scottsdale Insurance Co. v. MV Transportation (2005) 36 Cal.4th 643, 655, 31 Cal.Rptr.3d 147, 115 P.3d 460 : "The defense duty arises upon tender of a potentially covered claim and lasts until the underlying lawsuit is concluded, or until it has been shown that there is no potential for coverage. [Citation.] When the duty, having arisen, is extinguished by a showing that no claim can in fact be covered, 'it is extinguished only prospectively and not retroactively.' "
We recognize that Scottsdale Insurance Co. is an insurance case, and that there are some differences in treatment between insurance policies and other indemnity agreements. (See Crawford v. Weather Shield Mfg., Inc. , supra , 44 Cal.4th at p. 552, 79 Cal.Rptr.3d 721, 187 P.3d 424.) But R-Help cites no authority for a difference in treatment as it relates to the prospective application of the extinguishing of the duty to defend.
It follows that the trial court's jury instruction was erroneous. The court should have instructed that R-Help had a duty to defend and that it breached its duty. The only issue left for the jury would be damages.
*580[[/]]††
We reverse the judgment and remand. Centex is entitled to a new trial on the issue of damages for failure to defend.†† Costs are awarded to Centex.
We concur:
YEGAN, J.
TANGEMAN, J.
See footnote *, ante .
See footnote *, ante .
See footnote *, ante .
See footnote *, ante .