Appeals from two Special Term orders are before us, one of which vacates an order obtained by plaintiff ex parte discontinuing the action upon payment of defendant’s costs; the other grants defendant leave to serve a proposed amended answer containing a counterclaim under which a declaratory judgment is sought. We must determine whether under applicable rules of procedure the record justifies a discontinuance by the plaintiff of this action after plaintiff’s motion for summary judgment has been denied. (See 238 App. Div. 764; revd., 263 N. Y. 25.)
The plaintiff, a Georgia corporation, as lessor, sues to recover rent from the defendant, a New York corporation, as lessee. The contract which is the subject of the suit is a twenty-year lease covering retail store space in the Piedmont Hotel, Atlanta, Ga. The answer includes a general denial and an affirmative defense that defendant had assigned its rights under the lease to Atlanta-Nettleton Company, Inc., with plaintiff’s knowledge and consent and that accordingly defendant has been relieved from further liability thereunder.
Issue being joined, plaintiff moved at Special Term for summary judgment under rule 113 of the Rules of Civil Practice. The motion was denied, which decision was ultimately affirmed by the Court of Appeals (Piedmont Hotel Co. v. Nettleton Co., 263 N. Y. 25). Upon such affirmance defendant moved at Special Term to make the order and judgment of the Court of Appeals the order and judgment of the Special Term. Before the return day of such motion plaintiff obtained ex parte an order of discontinuance of this action conditioned upon the payment to defendant of costs to date. Thereafter defendant was granted an order to show cause why the order of discontinuance should not be vacated and asking leave to file a proposed amended answer adding to its original pleading a counterclaim in the form of a prayer for a declaratory judgment defining the legal duty, if any, of the defendant to pay rental under said lease. Plaintiff appeals from the order of the Special Term granting defendant’s motion to vacate the ex parte order of discontinuance herein and from the order granting defendant leave to file a proposed amended answer.
Under the general rule a plaintiff may discontinue an action or submit to a voluntary nonsuit at any time before its issues have been committed to the court or a jury. (Schintzuis v. Lackawanna Steel Co., 224 N. Y. 226. Cf. Civ. Prac. Act, § 457; Carmody’s New York Practice, vol. 2, p. 1463 et seq.) This rule, however, is not absolute. It is subject to various exceptions — asina case where the defendant in good faith has acted affirmatively by interposing a valid counterclaim or asserted a claim to the property involved and in his answer demands affirmative relief in reference to it. If, under these con*564ditions, he resists the discontinuance of the action the discretion of the court may be successfully invoked. (Willetts v. Browning, 198 App. Div. 551.) Likewise if substantial rights of third parties have accrued which would be prejudiced by the termination of the action, a discontinuance will be denied. (Frear v. Lewis, 201 App. Div. 660.) The courts have also denied discontinuance where, because of a time limitation in a contract, the defendant would be unable to defend a second action if the first action was terminated. (Grana v. Metropolitan Life Ins. Co., 237 App. Div. 54.) A further exception to the rule has found expression in matrimonial actions where public interest has been held to be concerned. In such cases the courts have denied the discontinuance of an action where the marriage itself or the legitimacy of children is involved. (Winans v. Winans, 124 N. Y. 140; Winston v. Winston, 21 App. Div. 371; Erlanger v. Erlanger, 173 id. 767.)
In the record before us we find no facts which bring the defendant’s position within the exceptions to the general rule. The denial of plaintiff’s motion for summary judgment went no further than a decision that the pleadings presented a question of fact for determination. It was stated: “ There being an ambiguity in the lease under consideration, the pleadings present a question of fact which should not be determined upon a motion for summary judgment, but should be tried in the ordinary manner. * * * Evidence is necessary to establish in what sense the parties used the ambiguous clause in question and the defendant is entitled to have that question tried as an issue of fact.” (Piedmont Hotel Co. v. Nettleton Co., supra, 29, 30.)
The defendant suggests that if plaintiff is now permitted to discontinue its action it may bring suit in another jurisdiction for the same relief. Such a suggestion is nothing more than conjecture which cannot form the basis for the determination of this appeal. (Telephonine Co. v. Douthitt, 115 App. Div. 362.)
We have not overlooked the rulings of Stanton v. King (76 N. Y. 585) and Carleton v. Darcy (75 id. 375), to which the respondent calls our special attention. We conclude, however, that under the facts of each of those cases the substantive rights of the parties involved had been more vitally affected by the action sought to be discontinued than in the case at bar.
There remains to be considered the question whether the defendant should have been granted leave to serve an amended answer which alters its original pleading only to the extent of adding a prayer for a declaratory judgment. The determination of that question depends upon whether the protection of defendant’s rights require him to resort to a declaratory judgment. “ Where *565there is no necessity for resorting to the declaratory judgment it should not be employed.” (James v. Alderton Dock Yards, 256 N. Y. 298, 305.)
In the case last cited the plaintiff brought an action at law for commissions which he claimed to have earned upon the sale of certain real and personal property. In denying him the right to a declaratory judgment the court was careful to point out that he did not need' such a form of judgment to establish his rights but when the proper time should arrive he could bring the usual form of action at law to recover for his services. So in the case at bar, the plaintiff brought an action for rent based upon a written lease. It adopted the usual form of action at law which afforded both parties full opportunity to test their respective legal rights under the terms of the written agreement. “ It was never contemplated that a counterclaim for a declaratory judgment should be a request for a declaration that certain legal defenses are sufficient.” (Slowmach Realty Corp. v. Leopold, 236 App. Div. 330, 333.)
We are not convinced that the defendant could have better protected its rights by seeking a declaratory judgment than by trying the issues in an action at law under the denials, and the affirmative defense of its original answer. It follows, under the rule quoted above, if there was no necessity for resorting to a declaratory judgment, the amendment to its answer, proposed by the defendant, should not have been allowed.
The order granting defendant’s motion to vacate the order of discontinuance of this action, and the order granting defendant leave to file a proposed amended answer should be reversed on the facts, with ten dollars costs and disbursements, and defendant’s motion in each instance denied, with ten dollars costs.
All concur. Present — Sears, P. J., Tayloe, Thompson, Crosby and Lewis, JJ.
Orders reversed on the facts in the exercise of discretion, with ten dollars costs and disbursements, and motions denied, with ten dollars costs.