An application for leave to discontinue an action is addressed to-the legal, and not to the arbitrary, discretion of the court; and, generally speaking, a plaintiff upon a tender of costs is entitled to an order of discontinuance as a matter of right. (Matter of Petition of Butler, 101 N. Y. 307; Winans v. Winans, 124 id. 140:)
This rule, liowevdr, is not without its exceptions, and in cases where the court can see that it would be unjust or highly prejudicial to the interests of the defendant, it may, through the control which it exercises .over its own order, refuse to allow a discontinuance. *51As, for instance, where a counterclaim is set up against which the Statute of Limitations would be a bar ( Van Alen v. Schermerhorn, 14 How. Pr. 287); or where, in an action for divorce upon the ground of adultery, counter charges of adultery by. the plaintiff are alleged in the answer (Campbell v. Campbell, 12 Hun, 636) ; or kq an action of ejectment, where the plaintiff having recovered judgment and been put into possession of the premises the defendant paid the costs and took a new trial under the statute. (Carleton v. Darcy, 75 N. Y. 375.)
It has also been held that leave to discontinue will be withheld where the obvious purpose of the plaintiff is to harass the defendant (Livermore v. Berdell, 60 How. Pr. 308); or where the public may be regarded ás a party to, and interested in, the result of the action. ( Winans v. Winans, supra.)
In short, the rule as stated in the case last cited will justify “ the right to refuse leave whenever circumstances exist which afford a basis for the exercise of legal discretion.” And we think the present case clearly falls within the principle thus enunciated. The defendants are receivers of a corporation which has been duly dissolved by a judgment of this court. As such they are officers of the court whose duty it is to secure and ratably distribute the assets of the corporation to all of its creditors with as little delay and expense as possible. In the discharge of this duty it appears that certain actions were brought by them upon á large number of notes made or indorsed by the plaintiff Kruger, in the firm name of “ E. H. Kruger & Co.that in séveral of these actions the subject-matter of this action was set up as a counterclaim, but that when these actions were brought to trial the counterclaims were withdrawn and the action tried upon other issues tendered by the answers, and that judgments were subsequently obtained therein against Kruger, whereupon he brought the action which he is now seeking to discontinue. This procedure upon the part of the plaintiff plainly indicates either an attempt to annoy and harass, or an effort to obtain priority over other creditors by commencing still another proceeding in the State of North Carolina, where it seems the plaintiff resides, and where the defendants have come into possession of some property belonging to the trust estate which they represent. In either case the inevitable result of the plaintiff’s course will be to *52embarrass the receivers in their efforts to execute the trust which the "court .has imposed upon them, and to impair the trust fund ■ to the prejudice of the rights of a large number of creditors. Moreover, if the object sought be to commence another proceeding in another State, the court -by permitting discontinuance would, indirectly at least, sanction an attempt by one creditor to obtain priority over the other creditors, and thus enable him to defeat one of the most salutary provisions of the law applicable to cases of this character. (People v. American Loan & Trust Co., 150 N. Y. 117.)
.It would seem hardly necessary to suggest that in these circumstances the trial court was invested with a larger discretion than it would ordinarily possess when dealing with.applications for leave to discontinue actions, and that its exercise of that discretion ought not to be condemned.
Immediately- upon the plaintiff’s motion being denied, the case was moved to trial by the defendants, and the plaintiff refusing to give any evidence, his complaint was - dismissed upon the merits, and a judgment to that effect was subsequently. entered.
This direction was given by the trial- court against ¡the remonstrance of the defendants’ counsel, who expressed doubt as to his right thereto in the absence of. any proof upon the part of the plaintiff. In this, we think, the learned counsel was clearly fight. The complaint was dismissed in default of proof, and the merits of the controversy were consequently in nowise involved, as the judgment appealed from erroneously declares. (Martin v. Cook, 14 N. Y. Supp. 329 ; affd., 142 N. Y. 654; Stokes v. Atlantic Avenue R. R. Co., 89 Hun, 2.)
It follows that the order appealed from should be affirmed, and the judgment amended by striking .therefrom the objectionable words.
Order refusing leave to discontinue affirmed, with ten dollars costs and disbursements, and judgment modified by. striking therefrom the words “ upon the merits,” and thus modified affirmed, without costs of this appeal to either party.
All concurred.
Judgment and order affirmed, with costs.