Daniels, J.
The plaintiff is a legatee under the will of Cornelia M. Stewart, deceased. This legacy was given by the third paragraph of the will, amounting to the sum of $250,000. By a third codicil to the will, the testatrix also gave, devised, and bequeathed to her an equal half part of the share of her property and estate previously devised and bequeathed to her nephew, Charles J. Clinch. Under this paragraph of the codicil, she became entitled to an equal undivided one-quarter of the residuary estate of the testatrix. This action has been brought by her to maintain and enforce the provisions of the will and codicils made in her favor. And in support of it she has alleged that the defendant Henry Hilton, by means of undue influence and fraudulent representations upon his part, induced the testatrix to transfer and convey to him the principal portion of the residuary estate, thereby diminishing the quantity which she would otherwise have received under this devise and bequest. And by way of relief in this action she has demanded that the transfer and conveyances shall be set aside, and the defendant Henry Hilton required to account for her share in this property, the same as though the transfer and conveyances had not been made. The answers included in the motion to strike out portions of them were served by other relatives of the testatrix, who were made parties to the action, as persons interested and to be affected by its disposition. By their'answers they have set forth and alleged that the will, and the codicils following it, were obtained from the testatrix by the defendant Henry Hilton through the use on his part of undue influence over her, and by fraudulent representations made to her; and on that account both the will and the codicils are objected to as being invalid and void against these defendants. The answers containing these allegations have been served upon the attorney for the defendant Henry Hilton; and it was in his behalf that the motion was made to strike out these allegations, together *823with argumentative portions of the answers, added for the purpose of sustaining them. The motion is resisted under the authority of sections 452 and 521 of the Code of Civil Procedure. By these sections, the court has been empowered, not only to make a complete determination of the action between tile plaintiff and the defendants, but, in addition to that, also to determine the ultimate rights of two or more defendants as between themselves. But neither these sections of the Code, nor any others, have been so far extended as to permit the defendants, by their answers, to add to the case a further disconnected and independent cause of action from that stated and set forth in the complaint. They were intended to follow and preserve the powers exercised by courts of equity in actions brought for their determination, as that was permitted and sanctioned by the law and practice previously existing; and by that practice, as well as by the language of these sections, the rights of the defendants to be determined between themselves must necessarily be those arising out of, or connected with, or resulting from, the cause of action set forth and maintained by and in favor of the plaintiff. It is a jurisdiction resulting from the disposition of the case made by the plaintiff, creating or producing rights or obligations in favor of one or more defendants against another or others. And their object is to secure a full and final adjustment of such rights and obligations, by way of completely determining the entire controversy arising out of the plaintiff’s action. This was the view followed by the chancellor in Jones v. Grant, 10 Paige, 348. And it was applied and enforced in Kay v. Whittaker, 44 N. Y. 565. And so it was, also, in Lansing v. Hadsall, 26 Hun, 619; Trust Co. v. Railroad Co., 18 Abb. N. C. 368; and Derham v. Lee, 87 N. Y. 599, 604. The facts set forth in the portions of the answers to which the motion was directed, in no manner were connected with,, or grew out of, or resulted from, the case stated by the plaintiff in her complaint. But they were alleged and stated, to set forth an 'entirely new cause of action, subverting that alleged and relied upon by the plaintiff, and intended and designed to set aside the will and all the codicils, on which she depended to support her right to maintain her suit. If the defendants were entitled to the relief, in this respect, demanded in their favor, the facts upon which it depended would constitute a new and distinct right of action, forming the basis of another and independent suit in their favor, and not a defense to the plaintiff’s action.
Section 1866 of the Code of Civil Procedure has provided, in certain specified cases, for the maintenance of an action to test the validity of a testamentary disposition of real property within this state, or of an interest therein. This, it has declared, may be done in like manner as an action to determine the validity of a deed made for the conveyance of land. But this section has been considered not to include cases of this description, (Anderson v. Appleton, 48 Hun, 534;) and it has not allowed or provided for a defense by way of answer, to include this subject; but the right, when that shall exist, is to be asserted and prosecuted only by means of an action. And while, by sections 500, 501, and 502, causes of action may be brought into the litigation by way of answer, as counter-claims, the provisions made for this purpose are not so broad as to include a cause of action within this section, or of this description; for the causes of action which may be brought into the litigation by way of counter-claim are restricted to such as arise out of the contract or transaction set forth in the complaint, or are connected with the subject of the action, or a claim upon a contract, alleged by way of couüter-claim, when the action itself is on contract. This defense falls within neither of these provisions. It certainly is not a caus.e of action on a contract, neither is it a cause of action arising out of the transactions set forth in the complaint as the foundation of the plaintiff’s demand, nor connected with the subject of that action; but, on the contrary, as the allegations are contained in the answers, it. is proposed, under them, to subvert the action of the plaintiff en*824tirely, and to secure relief upon a distinct and entirely independent state of facts. They are, accordingly, irrelevant to the case, as it has • been brought before the court. The Code also, as did the enactments of the preceding law, has vested in the surrogate of the county the jurisdiction to take proof of the execution, and determine the validity of wills, (Code Civil Proc. § 2472;) and his determination establishing the validity of a last will has, by sections 2626, 2627, been made conclusive, as long as it shall remain unreversed, of the validity of the will, so far as it may affect personal property, and presumptive evidence so far as it may affect real estate. And the only manner in which this effect can be avoided, where the decree shall remain unreversed, is to secure a further hearing before the surrogate, under the authority of article 2, tit. 3, c. 18, (§§ 2647-2653,) Code Civil Proc. Where that shall not be done, then the effect given to the proof and establishment of the will by the surrogate will be left in full force. This jurisdiction of the surrogate, like that vested in the ecclesiastical court of England over the personal estate, and of the courts of common law over the real estate, of the testator, has been considered, and held to be exclusive, furnishing and supplying the only mode in which the validity of a last will can be tried and determined, subject to whatever exception has now been supplied by section 1866 of the Code of Civil Procedure. In the exercise of the authority conferred upon the surrogate by the statutes of this state, it has been made'his province to try the objections to this will and these codicils, set forth in this manner by the answers of these defendants. And the objections are there being tried, as the fact has been made to appear, through the exercise by the surrogate of the power of rehearing vested in him by sections of the Code to which reference has already been made. • Ample authority, also, has been secured for the continuance of the litigation in this manner to a final conclusion in the court of last resort. And if the facts of.the will and codicils being obtained by undue influence, and by fraudulent representations, are to be litigated, and the instruments assailed as invalid, on this account, it must, in the first instance, be done in the surrogate’s court. This subject was examined and considered in Clark v. Fisher, 1 Paige, 171, where, as the result of the authorities, the chancellor declared that, “surrogates having exclusive jurisdiction in relation to the proof of wills of personal property, they must of necessity determine all questions of fraud, imposition, and undue influence in procuring such wills.” Id. 176. And the law was so considered to be settled, upon a very thorough reference to the authorities, in Gaines v. Chew, 2 How. 619. And the principle also has the sanction of Kerrick v. Bransby, 7 Brown, Parl. Cas. 437, and Allen v. M'Pherson, 1 H. L. Cas. 191. And its correctness was not gainsaid by anything which was held in Boyse v. Rossborough, 6 H. L. Cas. 2; for there the action was maintained in equity, only because of legal obstacles standing in the way of the suit, which would have been a defense to an action at law, but which a court of equity was entitled to control, as it did, to secure an immediate determination of the controverted rights of the parties. The allegations contained in the answers which have been made the subject of objection are not entitled to be so included, because of their violation, also, of this well-settled legal principle. They have set forth subject-matters not capable of being tried as any part of the issues between these parties. These allegations are voluminous and extended, and, if they are retained in Jhe answers, will necessarily impose upon the defendant, who has moved to strike them out, the obligation, at least, of being ready to meet them, either by contesting the facts, or upon the presentation of the law at the trial; and that he should not be obliged to do. If they formed any color-able ground upon which relief could be secured by these defendants against the defendant Henry Hilton, then, of course, they should be retained in the pleading. Walter v. Fowler, 85 N. Y. 621; Hagerty v. Andrews, 94 N. Y. 195. But they do not; for, upon each of the objections which have been con*825sidered, they manifestly have no place, legally, in the answers presented by these defendants. And when that is the case, and they are extended and voluminous, as they are in these answers, presenting subjects for trial which cannot be considered as a part of this litigation, they should be stricken out, as irrelevant and redundant. That is the only remedy afforded, for the answers of these defendants "cannot be made the subject of demurrers by the defendant Henry Hilton. This direction will in no manner contravene what was decided in Town of Essex v. Railroad Co., 8 Hun, 361; for it was there held that the court could reasonably strike out any matter which was plainly, and on the first glance, impertinent; and these allegations are of this description. This disposition is also sanctioned by the case of Molony v. Dows, 15 How. Pr. 261, in which the court, for like reasons, struck out portions of the pleading which, in that instance, was under its consideration. When other facts have been alleged which may be relevant to the case or defenses upon other grounds, they, of course, should be retained in the answers. This seems to be the case as to the concluding part of subdivision 6 of the answer of Rosalie and Virginia Butler, and of so much of subdivision 7 as is proposed to be stricken out; and also of paragraph 9 of the answer, containing an admission of a matter of fact. The same portions of the other answers should also be allowed to stand; but all the allegations of fraud and undue influence in obtaining the will and the codicils, stating facts of this description by way of defense to the plaintiff’s action, should be stricken from the answers. This, however, will not include the demands for judgment; for the parties, whether plaintiff or defendant, are at liberty to demand what they may please, to insert in their pleadings, having any pertinence whatever to the litigation before the court. And the costs of the appeal, as the application was too broadly made, should, with the disbursements, abide the event of the litigation. The order to be entered will only be settled upon notice being first given to these other defendants.
Van Brunt, P. J., concurs.