
173 Cal.App.2d 524 (1959)
FIRCO, INC. (a Corporation) et al., Appellants,
v.
FIREMAN'S FUND INSURANCE COMPANY (a Corporation), Respondent.
Civ. No. 9588. 
California Court of Appeals. Third Dist.  
Sept. 1, 1959.
 Guernsey Carson for Appellants.
 Hall, Henry, Oliver & McReavy and Stephen McReavy for Respondent.
 Weinstock, Anderson, Maloney & Chase as Amici Curiae on behalf of Respondent.
 VAN DYKE, P. J.
 This is an appeal from a declaratory judgment entered in an action brought by plaintiffs, as assured, against Fireman's Fund Insurance Company, as insurer. The judgment being adverse to plaintiffs, they appeal.
 Respondent issued sequential public liability policies designated as "Logger's General Comprehensive Coverage" (hereinafter called "the policy"), containing the following insuring agreements:
 "... To pay on behalf of the assured all sums which the assured shall become legally obligated to pay as damages because of injury to or destruction of property of others, ... arising out of an occurrence directly connected with the logging operations of the assured or other operations of the assured incidental to such logging operations including but not limited to:"
 "* * * *526"
 "2. Damage to or destruction of timberlands and/or standing timber and/or felled and/or bucked timber, the property of others."
 The policy further provided:
 "7. Defense and Appeal: The company shall:"
 "(A) Defend in the name of the assured any claim or suit in excess of the 'deductible limits' brought against the assured, even though groundless, false or fraudulent, to recover damages on account of such alleged property damage; ..."
 After the issuance of the policy an action was begun in the Superior Court for the County of Humboldt by Pacific Lumber Company, a corporation, which we will refer to as the Humboldt action, charging that plaintiffs herein, the assured under said policy, had entered upon the lands of the plaintiff and maliciously, wantonly and without leave had cut down and removed 207,480 feet of redwood trees and 263,020 feet of douglas fir to the plaintiffs' damage in the sum of $10,547.65. The prayer was for treble damages. In this action plaintiffs, appellants here, charged, and it was admitted, that when process in the Humboldt action was served upon them they demanded of respondent that it furnish a defense to said Humboldt action, that respondent refused to do so, and that by reason of said refusal appellants would be required to retain counsel to defend themselves in the Humboldt action and might be required ultimately to pay a judgment. It was further alleged that an actual controversy existed between the parties in that appellants contended and respondent denied that the policy obligated respondent to furnish a defense to the Humboldt action.
 The trial court found that the complaint in the Humboldt action charged, in substance, that the plaintiffs and appellants herein had intentionally entered upon the lands of the plaintiff in the Humboldt action and had cut down and removed its trees; that the cutting and removal of the quantity of timber involved could only have been accomplished by a series of many separate and intentional acts of human agents, and in so doing appellants must be held to have intended and anticipated the consequences naturally flowing therefrom, i.e., injury to the freehold. The court concluded that the rights and obligations of the parties depended upon the allegations of the complaint in the Humboldt action and the terms of the policy considered together; that the claim asserted in the Humboldt action was a claim for "damage to or destruction *527 of timberlands" as said phrase was used in the said policy; but that the injuries complained of did not arise out of an "occurrence" as that term is used in the policy, and that plaintiffs therefore were entitled to no relief. Judgment in accordance therewith was entered and this appeal followed.
 We think that upon a consideration of the allegations of the complaint in the Humboldt action and the insuring clauses of the policy the judgment must be reversed with instructions to the trial court to enter judgment declaring that respondent is obligated to defend the Humboldt action on behalf of its assured.
 [1a] Under the policy the obligation of respondent to defend an action brought against its assured is broader than its obligation to pay indemnity. The obligation to defend the assured must arise upon the commencement of the action. At that time it is obvious there may be considerable doubt whether the complaint counts upon a liability of the assured covered by the policy. This can be in part illustrated by the defense provisions of the policy which declare that the defense will be afforded even though the action against the assured be groundless, false, or fraudulent. Also there may be considerable doubt whether the complaint in the action against the assured contains allegations of fact, directly or inferentially stated, that can result in a judgment against the assured which the insurer under its policy would have to pay. Whether, therefore, when the action against the assured is begun, there will come out of it a judgment which the insurer will have to pay, or whether a defense of the action will show it to have been false, fraudulent, or groundless, so that no judgment can be rendered against the assured are all matters which may not be determinable when the action is begun.
 It appears from the record herein that appellants were loggers; that the policy was issued to provide indemnity against damage to or destruction of timberlands and/or standing timber, the property of others, arising out of the assured's logging operations; that the claim sued upon in the Humboldt action arose out of such logging operations and according to the trial court's findings the damage suffered by the plaintiff in the Humboldt action was for damages to or destruction of the timberlands of others as that phrase was used in the policy. But the trial court then found that the claim sued on did not arise out of an "occurrence" as that term was used in the policy. That, however, is something that cannot be *528 determined from a consideration of the complaint in the Humboldt action and the policy of insurance. We have presented to us, therefore, an action based upon a claim that may or may not be covered by the policy. In such a situation the insurer is obligated to undertake the defense of the action and to continue such defense at least until it appears that the claim is not covered by the policy. If and when that becomes certain the insurer may turn back the defense. This case is closely akin to the case of Lee v. Aetna Casualty & Surety Co., 178 F.2d 750 (and to cases cited therein), wherein the court in an opinion written by Judge Learned Hand said:
 "Whether the insurer ought to defend such an action at least until it appears that the claim is not covered by the policy is not free from doubt; but it seems to us that we should resolve the doubt in favor of the insured. In most cases--the case at bar was one--it will not be difficult for the insurer to compel the injured party to disclose whether the injury is within the policy; and, if it transpires that it is not, the insurer need go on no longer. There may be cases, however, in which that question will remain uncertain even until the end of the trial, and, if the defendant is right, the insured will be obliged to conduct the defence of a claim which it turns out the insurer has promised to pay. We do not believe that, had the question been presented to the parties in advance, they would have agreed that the promise to defend did not include all occasions in which the insurer eventually becomes liable to pay. The only exception we can think of is that the injured party might conceivably recover on a claim, which, as he had alleged it, was outside the policy; but which, as it turned out, the insurer was bound to pay. Such is the plasticity of modern pleading that no one can be positive that that could not happen. In such a case of course the insurer would not have to defend; yet, even then, as soon as, during the course of the trial, the changed character of the claim appeared, we need not say that the insured might not insist that the insurer take over the defence. When, however, as here, the complaint comprehends an injury which may be within the policy, we hold that the promise to defend includes it. Finally, if there be an ambiguity in the language of the policy, since the choice is between imposing the burden of the defence upon the insurer or the insured, the canon contra proferentem must prevail, especially as the case involves construing an insurance policy. ..."
 "It follows that, if the plaintiff's complaint against the *529 insured alleged facts which would have supported a recovery covered by the policy, it was the duty of the defendant to undertake the defence, until it could confine the claim to a recovery that the policy did not cover."
 [2] Under our liberal rules of pleading it is settled that if the facts alleged in a complaint entitle the plaintiff to any relief such relief will be accorded notwithstanding it may appear from the pleading or during the course of the action that the plaintiff cannot receive relief under his theory of the action. [3] For instance, take the trial court's finding that it appears from the complaint the entry of assured upon the lands of the plaintiff in the Humboldt action was intentional, whereas the policy excluded from coverage damage intentionally caused by the assured. The allegations in the complaint do not justify a conclusion that respondent is not obligated to defend, for it may turn out in the course of the action that the entry was unintentional and yet the plaintiff in the Humboldt action would be entitled to recover at least the value of the trees taken. It must be remembered that the attorney who drafted the complaint in the Humboldt action is not concerned with the relations between the defendant and any insurer that may be obligated to pay the judgment. He drafts his complaint as broadly as he desires. In the Humboldt action the plaintiff's attorney cast his complaint in such manner as to warrant the recovery of treble damages under section 3346 of the Civil Code if he could prove that the nature of the wrong and the manner of its infliction could be shown to entitle plaintiff to such damages under the provisions of that section. But if it should turn out that the manner of inflicting the wrong came within the exception provided in that section, which disallows treble damages "where the trespass was casual and involuntary, or committed under the belief that the land belonged to the trespasser," then plaintiff could obtain only actual damages. If that should turn out to be the result of the trial of the Humboldt action, then it might well transpire that respondent herein would be liable to pay the judgment for appellant herein as being a loss not excluded upon the ground of intentional injury.
 [1b] We think that we have a case here where the third party action against the assured appears to have been based upon a claim that might or might not turn out upon the trial of that action to have been one covered by the policy; that, therefore, the duty to defend the action arose when the action *530 was begun and will continue until in the proceedings in that case it certainly appears that the claim cannot eventuate in a judgment which the insurer is obligated to pay. That this state of certainty may not be arrived at until the judgment is actually rendered in the Humboldt action does not relieve respondent from its duty to defend the action.
 The judgment herein is reversed, with instructions to the trial court to enter a judgment in accordance herewith.
 Schottky, J., and Warne, J. pro tem.,  [fn. *] concurred.
NOTES
[fn. *]  *. Assigned by Chairman of Judicial Council.
