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. *708 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,
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 *709 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,
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
*710
facts which make up a separate cause of action relied on as a cross-demand against plaintiffs’ claim. Snyder v. Collier,
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,
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.
