
403 N.W.2d 383 (1987)
225 Neb. 218
UNITED STATES FIRE INSURANCE COMPANY, Appellee,
v.
AFFILIATED FM INSURANCE COMPANY, Appellee,
Vann Realty Company, A Nebraska Corporation, Appellant.
No. 85-644.
Supreme Court of Nebraska.
April 10, 1987.
Warren S. Zweiback and Maria R. Leslie of Zweiback, Flaherty, Betterman & Lamberty, P.C., Omaha, for appellant.
Melvin C. Hansen of Hansen, Engles & Locher, P.C., Omaha, for appellee United States Fire Ins.
Thomas J. Walsh, Sr., of Walsh, Fullenkamp, Doyle & Rau, Omaha, for appellee Affiliated FM Ins.
*384 KRIVOSHA, C.J., and BOSLAUGH, WHITE, HASTINGS, CAPORALE, SHANAHAN, and GRANT, JJ.
PER CURIAM.
Appellee United States Fire Insurance Company, which had issued a policy of insurance to appellant, Vann Realty Company, a Nebraska corporation, brought a declaratory judgment action against Vann Realty and appellee Affiliated FM Insurance Company, which had also issued a policy, seeking an adjudication that an Affiliated policy provided Vann Realty with certain coverages. Vann Realty in turn counterclaimed against United States Fire and cross-claimed against Affiliated, alleging that the policy each of them issued provided Vann Realty with the coverages in question. By an irregular procedure which is more fully described hereinafter, the district court dismissed all pending actions without prejudice at United States Fire's cost, and denied Vann Realty's application for fees and costs. We reverse and remand for further proceedings.
Vann Realty managed the Fox Run apartment complex in Omaha. United States Fire had issued a policy which required it to pay all sums Vann Realty, as the named insured, should become legally obligated to pay for property damage arising out of Vann Realty's "ownership, maintenance or use of" the Fox Run complex and "all operations necessary or incidental to [Vann Realty's business] conducted at or from" that complex, and to defend any suit seeking recovery from Vann Realty as a consequence of such damage. The policy, however, excluded from coverage "property damage to property in the care, custody or control" of Vann Realty or as to which Vann Realty was "for any purpose exercising physical control."
Affiliated had issued a policy to Howard D. and Judith M. Vann, which included as additional insureds the corporation owning the Fox Run complex and "any person (other than an employee of the named insured) or organization while acting as real estate manager for the named insured." The pertinent insuring and exclusionary language of the Affiliated policy is identical to that of the United States Fire policy.
The events underlying the present dispute started when the pipes at one of the Fox Run complex buildings began to freeze. Because the regular maintenance man had been called to another location, Ruth Smith, the resident manager of the Fox Run complex, telephoned Susan Blum, an employee of Vann Realty, and asked permission to rent a propane heater to use in thawing the pipes. Mrs. Smith's husband, Robert Smith, then attempted to heat the pipes. In the process the heater caused an explosion and fire which destroyed the subject building. Both of the above-described policies were in full force and effect at the time of the fire.
Affiliated paid the corporation owning the Fox Run complex for its damages. That corporation thereafter, presumably on behalf of Affiliated, filed suit against a number of defendants, alleging that their negligence resulted in the propane heater's causing an explosion and thereby became the proximate cause of the fire. Those defendants in turn filed a third-party complaint against Vann Realty, alleging that it was the negligence of Vann Realty's employee, Robert Smith, which proximately caused the fire. It appears that United States Fire defended Vann Realty under a reservation of rights, the terms of which are not included in the record. It further appears that this underlying litigation was settled and the third-party complaint against Vann Realty dismissed without prejudice.
In the meantime, United States Fire had filed the declaratory judgment action which is the subject of this appeal, alleging that its policy would not provide coverage to Vann Realty for the underlying litigation and, as indicated previously, seeking an adjudication that the Affiliated policy did provide such coverage. The issues raised and discussed by the parties to this appeal focus on who employed the Smiths and whether, in any event, the "care, custody or control" exclusions apply, these determinations *385 being treated as pivotal to the question of whether Vann Realty is entitled to coverage under the policies and to thereby recover certain attorney fees and costs from the two insurers.
However, because of the procedural posture in which this case comes to us, we do not reach those issues. United States Fire filed a "Motion to Dismiss" without prejudice "all claims pending" in its declaratory judgment action. Affiliated also filed a "Motion to Dismiss" United States Fire's declaratory judgment action and a "Motion to Dismiss Counterclaim of Vann Realty Company." The district court's order recites that the matter came on for hearing "on the motion[s] to dismiss filed by the plaintiff, United States Fire Insurance Company, and by the defendant, The Affiliated F.M. Insurance Company, and on the application for allowance of attorneys fees and costs filed by the defendant The Vann Realty Company." The district court dismissed all pending actions without prejudice on the ground that settlement of the underlying litigation rendered the actions involved in the present case moot, and denied Vann Realty fees because no favorable declaratory relief had been granted to it.
The difficulty is that the case was resolved through a procedure not recognized in our law. The district court undertook to dispose of the actions on the basis of evidence presented in conjunction with pretrial motions to dismiss. In rejecting that procedure in Voyles v. DeBrown Leasing, Inc., 222 Neb. 250, 383 N.W.2d 36 (1986), we again observed that a pretrial motion to dismiss another's action is not a permissible pleading. Accord, Smick v. Langvardt, 216 Neb. 778, 345 N.W.2d 830 (1984); Nelson v. Sioux City Boat Club, 216 Neb. 484, 344 N.W.2d 634 (1984); Blitzkie v. State, 216 Neb. 105, 342 N.W.2d 5 (1983).
It is true that under certain circumstances, and where by stipulation of the parties or court rule it is allowed, such an irregular motion may be treated as a demurrer. Voyles v. DeBrown Leasing, Inc., supra; Smick v. Langvardt, supra; Nelson v. Sioux City Boat Club, supra; Blitzkie v. State, supra. Such circumstances do not, however, exist in the present case; not only does the record not show a stipulation or court rule permitting such treatment, but the matter cannot be resolved solely on the basis of the allegations of United States Fire's petition or of Vann Realty's counterclaim and cross-petition.
Accordingly, Affiliated's motions are nullities. However, a plaintiff has the right to dismiss the action it has brought at any time prior to final submission. Schroeder v. Schroeder, 223 Neb. 684, 392 N.W.2d 787 (1986); Neb.Rev.Stat. § 25-601 (Reissue 1985). United States Fire's motion is therefore a valid dismissal of its petition against Affiliated and Vann Realty without prejudice, at United States Fire's costs. The matter thus pends on Vann Realty's counterclaim against United States Fire and cross-claim against Affiliated on which the evidence taken constitutes but a partial trial.
The question therefore becomes whether the district court could correctly conclude on the basis of that partial trial that the actions presented by Vann Realty's counterclaim against United States Fire and cross-petition against Affiliated were moot. The filing of the present action required Vann Realty to litigate its rights under the policies. That being so, Vann Realty's counterclaim against United States Fire presents a viable justiciable issue under Neb.Rev.Stat. § 44-359 (Reissue 1984), which provides that when one entitled thereto brings an action on an insurance policy, the court, "upon rendering judgment against" the insurer, shall allow the plaintiff a reasonable attorney fee. In order to determine whether Vann Realty is entitled to any attorney fee on its counterclaim in the present action, it is necessary that the district court determine whether the United States Fire policy obligated it to defend the allegations made against Vann Realty in the underlying litigation. *386 That cannot be done on the basis of the partial trial had.
Vann Realty's cross-petition against Affiliated is another matter. Affiliated did not institute this action, and whether it was correct or incorrect in deciding not to defend or make any payment on behalf of Vann Realty is, on the basis of the record developed to date, immaterial to Vann Realty because United States Fire defended and settled the underlying litigation. The posture of the case is such, however, that the district court was not yet entitled to rule on Vann Realty's cross-petition against Affiliated.
Thus, the order of the district court is reversed and the cause remanded for further proceedings consistent with this opinion.
REVERSED AND REMANDED FOR FURTHER PROCEEDINGS.
