#### SUPERIOR EQUIPMENT COMPANY, INCORPORATED, Plaintiff/Appellant, v. MARYLAND CASUALTY COMPANY, et al., Defendants/Respondents.

No. 69834.

Missouri Court of Appeals, Eastern District, Division Five.

Dec. 10, 1996.

*191Lewis C. Green, Bruce A. Morrison, Kathleen G. Henry, Green, Hennings & Henry, St. Louis, for Appellant.

Thomas W. Brunner, Daniel E. Troy, Luis De La Torre, Bryan N. Tramont, Washington, DC, Lisa A. Pake, St. Louis, for Maryland Casualty & Northern Insurance Co. of New York.

Jeffrey L. Cramer & T. Michael Ward, St. Louis, for TIG Insurance Group.

Robert J. Brummond & Lawrence S. Dehk, St. Louis, for American Alliance Insurance Co.

CRANDALL, Judge.

Plaintiff, Superior Equipment Company, Inc., appeals from the dismissal with prejudice of its petition for failure to state a claim against five defendants, Maryland Casualty Company, Transamerica Insurance Company, Northern Insurance Company of New York, American Alliance Insurance Company, and Safety National Casualty Corporation (hereinafter collectively referred to as insurers) in a declaratory judgment action to determine plaintiffs coverage under liability insurance policies issued by insurers. We reverse and remand.

In October 1993, in an underlying action filed in United States District Court, Eastern District of Missouri (hereinafter referred to as the federal action), Wastex Joint Steering Committee (WJSC) sought to recover from plaintiff the “response costs” it had incurred or would incur in the future to clean up hazardous substances which plaintiff allegedly transported and deposited at a site in East St. Louis, Illinois. During the time period pertinent to the federal action, plaintiff was insured under nine separate policies issued by the insurers. Although using different language, each policy in essence agreed to defend any action against plaintiff for property damage covered by the policy and to indemnify plaintiff for damages it was legally obligated to pay for such property *damage;*but excluded from coverage property damage caused by the discharge or escape of pollutants, unless such discharge was sudden and accidental.

Plaintiff reported the claims raised by WJSC in the federal action to the insurers, requesting that each insurer defend plaintiff in the federal action and acknowledge coverage of any judgment WJSC might obtain against plaintiff. The insurers denied the duty to defend and any coverage under their respective policies.

In April 1994, plaintiff brought the present action against the insurers in the Circuit Court of St. Louis County, seeking a declaratory. judgment that the insurers had a duty (1) to defend plaintiff in the federal action under the various policies and (2) to indemnify plaintiff against any liability in accordance with the provisions of the policies. Plaintiff moved for summary judgment on Count I, which dealt with the issue of the insurers’ duty to defend in the federal action. The trial court denied that motion. The insurers then moved to dismiss plaintiff’s petition on the basis that it failed to state a claim upon which relief could be granted. The court sustained that motion and dismissed plaintiffs petition with prejudice.

On appeal, the arguments of the parties are directed to the merits of plaintiffs declaratory judgment action. Yet, the trial court’s ruling was a dismissal of plaintiffs petition for failure to state a claim upon which relief could be granted.1 The salient issue is whether the petition for declaratory judgment was sufficient to withstand a motion to dismiss.

In determining whether any petition, including one purporting to state a *192cause of action for a declaratory judgment, states a claim, we accept as true all the facts pleaded and all the reasonable inferences drawn therefrom in order to determine whether the petition states any grounds for relief. *Harness v. State Farm Mut. Auto. Ins. Co.,*867 S.W.2d 591, 592 (Mo.App. E.D. 1993). A petition should be held sufficient if its averments invoke substantial principles of law which entitle the plaintiff to relief. *Washington Univ. v. Royal Crown Bottling Co. of St. Louis,*801 S.W.2d 458, 463 (Mo.App.1990). The test for the sufficiency of a petition for declaratory judgment is not whether the plaintiff is entitled to the relief prayed for, but whether he is entitled to a declaration of rights or status on the facts pleaded. *Cooper v. State,*818 S.W.2d 653, 655 (Mo.App.1991). If the averments are sufficient to show the propriety of declaratory relief, it is improper to dismiss the petition. *Royal Crown,*801 S.W.2d at 463.

Rule 87.02 pertains to declaratory judgments and provides in pertinent part:

> Any person interested under *a ...*written contract or other writings constituting a contract, or whose rights, status or other legal relations are affected by a ... contract ..., may have determined any question of construction or validity arising -under the instrument, ... [or] contract ... and obtain a declaration of rights, status or other legal relations thereunder.

In determining whether to sustain the insurers’ motion to dismiss in the present action, the trial court could consider only whether plaintiff was entitled to a declaratory judgment to interpret and construe the contracts of insurance on the facts pleaded and not whether plaintiff was entitled to judgment on the merits of the case. Clearly, plaintiff was a person whose rights were affected by the insurance policies; and plaintiff was entitled to a declaration of its rights under those contracts of insurance. *See Harness,*867 S.W.2d at 592. Plaintiff’s petition pleaded facts which indicated that a declaratory judgment was appropriate to determine its rights under the policies. Having sufficiently pleaded the elements of a declaratory judgment action, plaintiff was entitled to win or lose after submission of the issues raised therein on the merits. *See Id.*The trial court therefore erred in granting insurers’ motion to dismiss in lieu of entering a judgment declaring plaintiffs rights under the contracts of insurance.

We are unable to consider the issues raised by the parties on appeal, because those issues were directed to the merits of the declaratory judgment action. The trial court did not decide those issues when it dismissed plaintiffs petition for failure to state a claim upon which relief could be granted; and thus we cannot review them on appeal.

Accordingly, we reverse the trial court’s dismissal of plaintiffs petition and remand the cause for a hearing on the merits of the declaratory judgment action.

KAROHL, J., concurs.

CHARLES B. BLACKMAR, Senior Judge, concurs in result in opinion filed.

1

. There is no indication that the trial court treated this motion for dismissal as one for summary judgment under Rules 55.27(a) and 74.04; and, therefore, only those matters appearing on the face of the petition may be considered. *See Washington Univ. v. Royal Crown Bottling Co. of St. Louis,*801 S.W.2d 458, 463 n. 1 (Mo.App.1990).

CHARLES B. BLACKMAR, Senior Judge,

concurring in result.

I quite agree with the principal opinion in its holding that, when a petition in a declaratory judgment action discloses an actual controversy, the court has the duty to declare the governing law and should not dismiss the petition for failure to state a cause of action. The court has some discretion in deciding whether to entertain a declaratory judgment action, but a ruling based on discretion should be distinctly labeled, and there is no indication that the circuit court sought to exercise discretion. Thus the dismissal for failure to state a cause of action was erroneous.

Still, however, lawyers for defendants file motions to dismiss declaratory judgment actions, arguing that the plaintiff is not entitled to the declaration sought in the petition, and trial judges not infrequently sustain such motions. It seems clear that the trial judge in this ease intended to put the plaintiff out of court by dismissing the petition with prejudice.

The parties have briefed the merits, and neither side suggests that there are unresolved questions of fact. Under Rule 84.14 *193we are authorized to “give such judgment as the [circuit] court ought to give.” We are further admonished that we should “dispose finally of the case,” with the qualification, “unless justice otherwise requires.”

I would not establish an automatic rule that an erroneous dismissal of a declaratory judgment action for failure to state a cause of action requires reversal in all cases. I would allow the appellate court to consider and decide the merits, if persuaded that the case presents ripe questions of law.

In this case there are special circumstances which indicate that a reversal and remand would be a wise course, and so I concur in the judgment of reversal and remand.