
50 Cal.2d 654 (1958)
ANTHONY J. COMUNALE, Appellant,
v.
TRADERS AND GENERAL INSURANCE COMPANY (a Corporation), Respondent.
L.A. No. 24975. 
Supreme Court of California. In Bank.  
July 22, 1958.
 Newlin, Tackabury & Johnston and Frank R. Johnston for Appellant.
 W. P. Smith and Henry F. Walker for Respondent.
 H. Thomas Ellerby as Amicus Curiae on behalf of Respondent.
 GIBSON, C.J.
 Mr. and Mrs. Comunale were struck in a marked pedestrian crosswalk by a truck driven by Percy Sloan. Mr. Comunale was seriously injured, and his wife suffered minor injuries. Sloan was insured by defendant Traders and General Insurance Company under a policy that contained limits of liability in the sum of $10,000 for each person injured and $20,000 for each accident. He notified Traders of the accident and was told that the policy did not provide coverage because he was driving a truck that did not belong to him. When the Comunales filed suit against Sloan, Traders refused to defend the action, and Sloan employed competent counsel to represent him. On the second day of the trial Sloan informed Traders that the Comunales would compromise the case for $4,000, that he did not have enough money to effect the settlement, and that it was highly probable the jury would return a verdict in excess of the policy limits. Traders was obligated to defend any personal injury suit covered by the policy, but it was given the right to make such settlement as it might deem expedient. Sloan demanded that Traders assume the defense and settlement of the case. Traders refused, and the trial proceeded to judgment in favor of Mr. Comunale for $25,000 and Mrs. Comunale for $1,250.
 Sloan did not pay the judgment, and the Comunales sued Traders under a provision in the policy that permitted an *658 injured party to maintain an action after obtaining judgment against the insured. (See Ins. Code,  11580, subd. (b) (2).) In that suit judgment was rendered in favor of Mr. Comunale for $10,000 and in favor of Mrs. Comunale for $1,250. This judgment was satisfied by Traders after it was affirmed in Comunale v. Traders & General Ins. Co., 116 Cal.App.2d 198 [253 P.2d 495].
 Comunale obtained an assignment of all of Sloan's rights against Traders and then commenced the present action to recover from Traders the portion of his judgment against Sloan which was in excess of the policy limits. The jury returned a verdict in Comunale's favor, but the trial court entered a judgment for Traders notwithstanding the verdict.
 The following questions are presented on Comunale's appeal from the judgment: (1) Did Sloan have a cause of action against Traders for the amount of the judgment in excess of the policy limits? (2) Was Sloan's cause of action against Traders assignable? (3) Was the cause of action barred by the statute of limitations?
 Liability in Excess of the Policy Limits
 In determining whether Traders is liable for the portion of the judgment against Sloan in excess of the policy limits, we must take into consideration the fact that Traders not only wrongfully refused to defend the action against Sloan but also refused to accept an offer of settlement within the policy limits. It is not claimed the settlement offer was unreasonable in view of the extent of the injuries and the probability that Sloan would be found liable, and Traders' only reason for refusing to settle was its claim that the accident was not covered by the policy. Because of its wrongful denial of coverage, Traders failed to consider Sloan's interest in having the suit against him compromised by a settlement within the policy limits.
 [1] There is an implied covenant of good faith and fair dealing in every contract that neither party will do anything which will injure the right of the other to receive the benefits of the agreement. (Brown v. Superior Court, 34 Cal.2d 559, 564 [212 P.2d 878].) This principle is applicable to policies of insurance. (Hilker v. Western Automobile Ins. Co., 204 Wis. 1 [231 N.W. 257, 258] (aff'd on rehg., 204 Wis. 1 [235 N.W. 413]).) In the Hilker case it is pointed out that the rights of the insured "go deeper than the mere surface of the contract written for him by defendant" and that implied obligations are imposed "based upon those principles of fair *659 dealing which enter into every contract." (231 N.W. at p. 258.) [2] It is common knowledge that a large percentage of the claims covered by insurance are settled without litigation and that this is one of the usual methods by which the insured receives protection. (See Douglas v. United States Fidelity & Guaranty Co., 81 N.H. 371 [127 A. 708, 712]; Hilker v. Western Automobile Ins. Co., supra.) [3] Under these circumstances the implied obligation of good faith and fair dealing requires the insurer to settle in an appropriate case although the express terms of the policy do not impose such a duty.
 [4] The insurer, in deciding whether a claim should be compromised, must take into account the interest of the insured and give it at least as much consideration as it does to its own interest. (See Ivy v. Pacific Automobile Ins. Co., 156 Cal.App.2d 652, 659 [320 P.2d 140].) [5] When there is great risk of a recovery beyond the policy limits so that the most reasonable manner of disposing of the claim is a settlement which can be made within those limits, a consideration in good faith of the insured's interest requires the insurer to settle the claim. Its unwarranted refusal to do so constitutes a breach of the implied covenant of good faith and fair dealing.
 [6] There is an important difference between the liability of an insurer who performs its obligations and that of an insurer who breaches its contract. The policy limits restrict only the amount the insurer may have to pay in the performance of the contract as compensation to a third person for personal injuries caused by the insured; they do not restrict the damages recoverable by the insured for a breach of contract by the insurer.
 [7] The decisive factor in fixing the extent of Traders' liability is not the refusal to defend; it is the refusal to accept an offer of settlement within the policy limits. [8] Where there is no opportunity to compromise the claim and the only wrongful act of the insurer is the refusal to defend, the liability of the insurer is ordinarily limited to the amount of the policy plus attorneys' fees and costs. (Mannheimer Bros. v. Kansas Casualty & Surety Co., 149 Minn. 482 [184 N.W. 189, 191].) In such a case it is reasoned that, if the insured has employed competent counsel to represent him, there is no ground for concluding that the judgment would have been for a lesser sum had the defense been conducted by insurer's counsel, and therefore it cannot be said that the detriment *660 suffered by the insured as the result of a judgment in excess of the policy limits was proximately caused by the insurer's refusal to defend. (Cf. Lane v. Storke, 10 Cal.App. 347, 350 [101 P. 937].) This reasoning, however, does not apply where the insurer wrongfully refuses to accept a reasonable settlement within the policy limits.
 Most of the cases dealing with the insurer's failure to settle involve an insurer who had assumed the defense of the action against the insured. [9] It is generally held that since the insurer has reserved control over the litigation and settlement it is liable for the entire amount of a judgment against the insured, including any portion in excess of the policy limits, if in the exercise of such control it is guilty of bad faith in refusing a settlement. (Brown v. Guarantee Ins. Co., 155 Cal.App.2d 679, 682 [319 P.2d 69]; Ivy v. Pacific Automobile Ins. Co., 156 Cal.App.2d 652, 659 [320 P.2d 140]; see anno., Duty of Liability Insurer to Settle or Compromise, 40 A.L.R. 2d 168, 178; Roos, A Note on the Excess Problem, 26 Cal. State Bar J. 355, 356.) Those cases are, of course, factually distinguishable from the present one since Traders never assumed control over the defense. [10] However, the reason Traders was not in control of the litigation is that it wrongfully refused to defend Sloan, and the breach of its express obligation to defend did not release it from its implied duty to consider Sloan's interest in the settlement.
 [11] We do not agree with the cases that hold there is no liability in excess of the policy limits where the insurer, believing there is no coverage, wrongfully refuses to defend and without justification refuses to settle the claim. (See State Farm Mut. Auto. Ins. Co. v. Skaggs, 251 F.2d 356, 359, and Fidelity & Casualty Co. of New York v. Gault, 196 F.2d 329, 330.) [12] An insurer who denies coverage does so at its own risk, and, although its position may not have been entirely groundless, if the denial is found to be wrongful it is liable for the full amount which will compensate the insured for all the detriment caused by the insurer's breach of the express and implied obligations of the contract. Certainly an insurer who not only rejected a reasonable offer of settlement but also wrongfully refused to defend should be in no better position than if it had assumed the defense and then declined to settle. The insurer should not be permitted to profit by its own wrong.
 [13] A breach which prevents the making of an advantageous settlement when there is a great risk of liability in *661 excess of the policy limits will, in the ordinary course of things, result in a judgment against the insured in excess of those limits. Section 3300 of the Civil Code provides that the measure of damages for a breach of contract is the amount which will compensate the party aggrieved for all the detriment proximately caused by the breach, or which, in the ordinary course of things, would be likely to result from it. (For cases holding Civ. Code  3300 applicable to liability insurance contracts, see Henkel v. Pacific Employers Ins. Co., 140 Cal.App.2d 301, 305-306 [295 P.2d 80]; Venturi v. Zurich General Acc. & Liab. Co., 14 Cal.App.2d 89 [57 P.2d 1002].)
 It is clear that section 3300 of the Civil Code authorizes a recovery in excess of the policy limits, and in our opinion there is no merit in Traders' contention that section 3358 of the Civil Code so qualifies section 3300 as to prevent such a recovery. Section 3358 provides that a person cannot recover a greater amount in damages for the breach of an obligation than he could have gained by full performance. The question is what would Sloan have gained from the full performance of the policy contract with Traders. (Cf. Henderson v. Oakes-Waterman, Builders, 44 Cal.App.2d 615, 618 [112 P.2d 662].) If Traders had performed its contract, it would have settled the action against Sloan, thereby protecting him from all liability. The allowance of a recovery in excess of the policy limits will not give the insured any additional advantage but merely place him in the same position as if the contract had been performed.
 [14] It follows from what we have said that an insurer, who wrongfully declines to defend and who refuses to accept a reasonable settlement within the policy limits in violation of its duty to consider in good faith the interest of the insured in the settlement, is liable for the entire judgment against the insured even if it exceeds the policy limits.
 Assignability of the Cause of Action
 [15] An action for damages in excess of the policy limits based on an insurer's wrongful failure to settle is assignable whether the action is considered as sounding in tort or in contract. (See Civ. Code,  954; Brown v. Guarantee Ins. Co., 155 Cal.App.2d 679, 693-695 [319 P.2d 69].) [16] Traders relies on a clause in the policy which provides that an assignment of an interest under the policy shall be binding only if Traders consents thereto. However, it is well settled that such a provision does not preclude the transfer of a cause *662 of action for damages for breach of a contract. (Trubowitch v. Riverbank Canning Co., 30 Cal.2d 335, 339-340 [182 P.2d 182].) This rule has been applied to provisions against assignability in insurance policies similar to the provision involved here. (Vierneisel v. Rhode Island Ins. Co., 77 Cal.App.2d 229, 232 [175 P.2d 63]; Pietrantonio v. Travelers Ins. Co., 282 Mich. 111 [275 N.W. 786, 788]; see 7 Appleman, Insurance Law and Practice,  4269, pp. 45-46.) Accordingly, Sloan could assign his cause of action to Comunale.
 Statute of Limitations
 [17] Sloan's cause of action against the insurer arose on August 13, 1950, when the judgment in the bodily injury action became final. The complaint in the present action was filed on May 28, 1954, less than four years but more than two years after the cause of action arose. Traders contends that an action on an implied obligation arising out of contract is not on the written instrument and that therefore the four-year term prescribed in section 337, subdivision 1, of the Code of Civil Procedure is not applicable.  [fn. *] We do not agree. [18] The promise which the law implies as an element of the contract is as much a part of the instrument as if it were written out. (O'Brien v. King, 174 Cal. 769, 774-775 [164 P. 631]; Tanzola v. De Rita, 45 Cal.2d 1, 9 [285 P.2d 897]; Gardner v. Basich Bros. Construction Co., 44 Cal.2d 191, 194 [281 P.2d 521]; Lawrence Barker, Inc. v. Briggs, 39 Cal.2d 654, 661 [248 P.2d 897].) Traders relies on a statement in Scrivner v. Woodward, 139 Cal. 314, 316 [73 P. 863], that "Promises merely implied by law, and not supported by any express promise or stipulation in the written instrument, do not fall within the provision of section 337, relating to contracts in writing." This statement is too broad, and it was limited in O'Brien v. King, 174 Cal. 769, 774 [164 P. 631], as applying only to a quasi contractual liability. The cases of Thomas v. Pacific Beach Co., 115 Cal. 136 [46 P. 899], and Sunset Pac. Oil Co. v. Los Angeles etc. R. R. Co., 110 Cal.App. Supp. 773 [290 P. 434], which involved restitution, are explainable on the same ground. *663
 [19] Although a wrongful refusal to settle has generally been treated as a tort (see Keeton, Liability Insurance and Responsibility for Settlement, 67 Harv. L. Rev. 1136, 1138; Anno., 131 A.L.R. 1499, 1500), it is the rule that where a case sounds both in contract and tort the plaintiff will ordinarily have freedom of election between an action of tort and one of contract. (Eads v. Marks, 39 Cal.2d 807, 811 [249 P.2d 257].) [20] An exception to this rule is made in suits for personal injury caused by negligence, where the tort character of the action is considered to prevail (Huysman v. Kirsch, 6 Cal.2d 302, 306 [57 P.2d 908]; Krebenios v. Lindauer, 175 Cal. 431 [166 P. 17]), but no such exception is applied in cases, like the present one, which relate to financial damage (cf. County of Santa Clara v. Hayes Co., 43 Cal.2d 615, 619 [275 P.2d 456]; Jones v. Kelly, 208 Cal. 251, 255 [280 P. 942]).
 The judgment is reversed with directions to the superior court to enter judgment on the verdict.
 Shenk, J., Carter, J., Traynor, J., Schauer, J., Spence, J., and McComb, J., concurred.
 Code of Civil Procedure, section 339, subdivision 1, provides in part that the two years' period of limitation applies to an action "upon a contract, obligation or liability not founded upon an instrument of writing, ..."
NOTES
[fn. *]  *. Code of Civil Procedure, section 337, subdivision 1, provides in part that the four years' period of limitation applies to an action "upon any contract, obligation or liability founded upon an instrument in writing, ..."
