
191 Cal.App.3d 74 (1987)
236 Cal. Rptr. 216
STATE FARM FIRE AND CASUALTY COMPANY, Petitioner,
v.
THE SUPERIOR COURT OF ORANGE COUNTY, Respondent; VICTOR LAWRENCE PAHL, Real Party in Interest.
Docket No. G004875.
Court of Appeals of California, Fourth District, Division Three.
April 15, 1987.
*75 COUNSEL
Hill, Genson, Even, Crandall & Wade and William R. Lowe for Petitioner.
No appearance for Respondent.
Yacobozzi & Sterling and William Yacobozzi, Jr., for Real Party in Interest.
OPINION
TROTTER, P.J.
Real Party Victor Lawrence Pahl allegedly shot his wife and her attorney when they tried to inventory his pawnshop in connection *76 with a marriage dissolution proceeding. State Farm insured Pahl under a homeowner's policy. His wife and her attorney each brought civil actions against Pahl for damages resulting from the shootings, and State Farm undertook Pahl's defense in each of those actions. Pahl is also being prosecuted for attempted murder and assault with a deadly weapon. In the underlying declaratory relief action, Pahl sought a judicial declaration that State Farm is obligated under his homeowner's policy to undertake his defense in the criminal action.
The homeowner's policy in question contained the following language:

"COVERAGE L  PERSONAL LIABILITY
"If a claim is made or a suit is brought against an insured for damages because of bodily injury or property damage to which this coverage applies, we will:
"(1) Pay up to our limit of liability for the damages for which the insured is legally liable; and
"(2) Provide a defense at our expense by counsel of our choice. We may make any investigation and settle any claim or suit that we decide is appropriate. Our obligation to defend any claim or suit ends when the amount we pay for damages resulting from the occurrence equals our limit of liability." Pahl claimed this language obligated State Farm to defend him in the criminal prosecution.
(1a) State Farm demurred, alleging the complaint failed to state a cause of action since the rights and duties described did not fall within any basic insuring agreement between real party and petitioner. The trial court overruled the demurrer and State Farm petitioned this court for a writ of mandate to compel the trial court to sustain the demurrer. We conclude the demurrer should have been sustained.
(2) Ordinarily when a plaintiff pleads a contract and a controversy concerning the effect of terms of the contract a cause of action for declaratory relief has been stated and a demurrer is inappropriate. However, where the facts relied on by plaintiff do not support a declaration in his favor as a matter of law, demurrer is proper. (International Assn. of Fire Fighters v. City of Palo Alto (1963) 60 Cal.2d 295, 301-302 [32 Cal. Rptr. 842, 384 P.2d 170]; Haddad v. Electronic Production & Development, Inc. (1963) 219 Cal. App.2d 137, 141 [33 Cal. Rptr. 89].) Under these circumstances mandate lies to compel the trial court to sustain the demurrer. (See Tyco Industries, Inc. v. Superior Court (1985) 164 Cal. App.3d 148, 153-154 [211 Cal. Rptr. *77 540].) This court's opinion is, in effect, a declaration of the parties' rights. (Newby v. Alto Riviera Apartments (1976) 60 Cal. App.3d 288, 304 [131 Cal. Rptr. 547], disapproved on a point not pertinent here in Marina Point, Ltd. v. Wolfson (1982) 30 Cal.3d 721, 740-741, fn. 9 [180 Cal. Rptr. 496, 640 P.2d 115, 30 A.L.R. 4th 1161]; Western Homes v. Herbert Ketell, Inc. (1965) 236 Cal. App.2d 142, 146 [45 Cal. Rptr. 856].)
(3) An insurer is not obligated to defend a suit which does not seek the recovery of damages covered by the claimant's policy. (Giddings v. Industrial Indemnity Co. (1980) 112 Cal. App.3d 213, 219-220 [169 Cal. Rptr. 278].) Insurance Code section 533 specifically provides, "An insurer is not liable for a loss caused by the wilful act of the insured...." But, Pahl argues, the insurance company's duty to defend is much broader than its duty to indemnify. (Gray v. Zurich Insurance Co. (1966) 65 Cal.2d 263, 275 [54 Cal. Rptr. 104, 419 P.2d 168].) In Gray the court held an insurer had a duty to defend its insured in a personal injury action based on allegations of an intentional tort even though the applicable policy excluded injury intentionally caused. Part of the rationale of that decision was that the suit involved potential damages based on nonintentional conduct which was within the coverage of the policy. As long as the potentiality of coverage exists, the duty to defend also exists. But where there is no possibility of coverage, there is no duty to defend. This is such a case. (1b) Pahl's homeowner's policy does not cover any liability which might arise from the alleged criminal action.
In Jaffe v. Cranford Ins. Co. (1985) 168 Cal. App.3d 930 [214 Cal. Rptr. 567], a psychiatrist was prosecuted for Medi-Cal fraud and theft. He claimed his malpractice carrier was obligated to pay his defense costs incurred in the criminal prosecution. The insurer's demurrer to the psychiatrist's suit for tortious breach of contract was sustained without leave to amend, and that ruling was affirmed on appeal. The court stated, "In the present case, the outcome of Jaffe's criminal case could not result in damages payable under the policy since neither imprisonment nor a fine constitutes `damages' for insurance purposes." (Id., at p. 934.)
Pahl argues the criminal action could result in damages covered under the homeowner's policy if he were required to make restitution to the victims. We have found no California case directly in point, nor have counsel provided us with any such authority.
We do note under California law an insurance carrier is not liable for any portion of a judgment rendered against its insured for punitive or exemplary damages. (See Peterson v. Superior Court (1982) 31 Cal.3d 147, 156 [181 Cal. Rptr. 784]; Ford Motor Co. v. Home Ins. Co. (1981) 116 Cal. App.3d 374, 379 [172 Cal. Rptr. 59]; Annot., Insurance Coverage  Punitive Damages, 16 *78 A.L.R.4th 11.) In City Products Corp. v. Globe Indemnity Co. (1979) 88 Cal. App.3d 31, at page 42 [151 Cal. Rptr. 494], the court, noting the primary purpose of punitive damages in California is punishment and deterrence, stated: "[T]he policy of this state with respect to punitive damages would be frustrated by permitting the party against whom they are awarded to pass on the liability to an insurance carrier." (See California State Auto. Assn. Inter-Ins. Bureau v. Carter (1985) 164 Cal. App.3d 257, 262 [210 Cal. Rptr. 140].) We find that rationale applicable here. Restitution is ordered as punishment in a criminal case. No conceivable justification exists for allowing an individual to pass on such liability to an insurance carrier.
Let a peremptory writ of mandate issue (Palma v. U.S. Industrial Fasteners, Inc. (1984) 36 Cal.3d 171, 182 [203 Cal. Rptr. 626, 681 P.2d 893]) directing respondent Orange County Superior Court to annul its order overruling petitioner's demurrer and to enter a new and different order sustaining the demurrer without leave to amend.
Wallin, J., and Sonenshine, J., concurred.
The petition of real party in interest for review by the Supreme Court was denied June 17, 1987.
