
    James Giesler et al., appellants, v. City of Omaha, a municipal corporation, appellee, Don Hansen, doing business as Don’s Mobil, et al., interveners-appellants.
    123 N. W. 2d 650
    Filed October 4, 1963.
    No. 35419.
    
      Haney, Walsh & Wall, for appellants.
    Herbert M. Fitle, Bernard E. Vinardi, Frederick A. Brown, Edward M. Stein, Sebastian J. Todero, Walter J. Matejka, and Frederick S. Geihs, for appellee.
    Heard before White,, C. J., Carter, Messmore, Yeager, Spencer, Boslaugh, and Brower, JJ.
   Carter, J.

This is an action for a declaratory judgment seeking to have declared unconstitutional an ordinance of the city of Omaha purporting to regulate the doing of business on Sunday. The plaintiffs were the owners of eight separate drug stores in the city of Omaha. Two parties intervened in the action, one the owner of a gasoline filling station and the other the owner of a drug store. The city of Omaha was the sole defendant in the original action and in the petitions in intervention.

The petition and the petitions in intervention asserted that the Sunday closing ordinance, ordinance No. 21945 of the city of Omaha, was unconstitutional and void as being in conflict with specified sections of the state and federal Constitutions, and certain specified sections of the statutes of Nebraska. After the issues were made up and the case set for trial the plaintiffs and interveners filed a dismissal of their respective petitions. The city of Omaha filed objections to the dismissals. The trial court dismissed the petitions of the plaintiffs and interveners, but directed that the trial proceed on the issues raised by the amended answer of the city of Omaha. The plaintiffs and interveners assign this as error.

The right of plaintiffs and interveners to dismiss their petitions before final submission of the case to the court is controlled by section 25-601, R. R. S. 1943, which provides in part: “An action may be dismissed without prejudice to a future action (1) by the plaintiff, before the final submission of the case to the jury, or to the court where the trial is by the court; * * It is a statutory right and not a matter of judicial grace or discretion. Duffy v. Cody, 129 Neb. 737, 262 N. W. 828. The trial court properly dismissed the actions by virtue of this statutory provision. The defendant contends that the trial court properly retained the case for trial under section 25-603, R. R. S. 1943, which provides: “In any case where a set-off or counter-claim has been presented, the defendant shall have the right of proceeding to the trial of his claim, although the plaintiff may have dismissed the action or failed to appear.” The nature of the pleadings filed by the defendant to the petitions of plaintiffs and interveners is of controlling importance in determining the correctness of the court’s order in retaining the case for trial.

The answer filed by the defendant admits certain facts pleaded in plaintiffs’ petition and denies the facts not admitted. The prayer of the answer was for an order dismissing plaintiffs’ petition and the dissolution of a restraining order previously entered, the denial of plaintiffs’ application for a temporary and permanent injunction, a request for an order declaring ordinance No. 21945 to be valid and effective, and a prayer for general equitable relief. By an amended answer the defendant asserted the validity of the ordinance and that it was entitled to a judgment declaring its validity. No prayer for relief was contained in the amended answer.

No contention is made that the case had been submitted at the time the dismissal was filed. Defendant relies solely on section 25-603, R. R. S. 1943, to sustain its position.

The right of a party to voluntarily dismiss an action is governed by the common law except as modified by statute. The right to dismiss is liberally construed in favor of the right, but strictly construed to' the extent that it is in derogation of the common law. In Plattsmouth Loan & Bldg. Assn. v. Sedlak, 128 Neb. 509, 259 N. W. 367, this court quoted with approval the following: “The right of a plaintiff to take a nonsuit or dismiss the action upon discovery at any stage of the trial that, in the then state of his case, he cannot recover or safely proceed further, is essential to an efficient administration of the law and often enables justice to prevail when otherwise it would miscarry. * * * So the wisdom and policy of the common law always freely accorded the privilege to litigants, while statutory limitations of its exercise have usually been restricted by the courts within their exact terms.”

By the terms of section 25-603, R. R. S. 1943, a defendant who has presented a setoff or counterclaim may proceed with the trial of his claim irrespective of plaintiff’s dismissal. Defendant contends that this situation existed in the present case. A setoff or counterclaim is a separate claim from that asserted by the plaintiff. It must state a cause of action against the plaintiff. Counterclaims and setoffs are required to be separately stated and numbered, which was not done in the instant case. The answer of the defendant stated no cause of action against the plaintiffs. It was defensive only. The alleged statement of an affirmative defense was nothing more than the inverse statement of the prayer of the petitions of plaintiffs and interveners.

A cross-demand, whether it be a setoff, counterclaim, recoupment, or for other affirmative relief, must allege facts which make up a separate cause of action relied on as a cross-demand against plaintiffs’ claim. Snyder v. Collier, 85 Neb. 552, 123 N. W. 1023, 133 Am. S. R. 682; In re Estate of Nilson, 126 Neb. 541, 253 N. W. 675; Gibson v. Koutsky-Brennan-Vana Co., 143 Neb. 326, 9 N. W. 2d 298.

In 71 C. J. S., Pleading, § 174, p. 354, the rule is stated as follows: “The cross demand must be pleaded as fully and distinctly, and with the same substantial requisites, as an original cause of action; it must be sufficient in itself, without recourse to1 other parts of the pleading or to other pleadings, unless by express reference.” We fail to find any facts pleaded which entitle the defendant to any affirmative relief against the plaintiff's and interveners.

While a counterclaim or setoff is required by statute to be separately stated and numbered, we cannot say that a failure to comply in that respect is fatal where the quesiton is not timely raised. State v. Coughran, 19 S. D. 271, 103 N. W. 31. Assuming that the formality of the pleading is sufficient, the contention of the defendant must fail for the reason that the facts pleaded do not state a cause of action against the plaintiffs and interveners. Under such circumstances the defendant is not within the provisions of section 25-603, R. R. S. 1943, and the dismissal by plaintiffs and interveners had the effect of withdrawing the entire case from the consideration of the court.

The trial court was in error in proceeding with the case upon the filing of the dismissal by the plaintiffs and interveners. The action of the court in holding the case for trial on the answer and purported counterclaim of the defendant, and entering a judgment thereon, is reversed and the cause remanded with directions to dismiss the entire action.

Reversed and remanded with directions.  