— Order and judgment, Supreme Court, New York County (Peter Tom, J.), entered September 4 and September 25, 1991, respectively, which, inter alia, denied plaintiff’s motion for summary judgment and granted defendants’ cross-motions for summary judgment dismissing the amended verified complaint, unanimously reversed, on the law, insofar as appealed from, to deny the cross-motions seeking summary judgment, to reinstate the complaint, and to grant plaintiff’s motion for summary judgment on her first cause of action declaring that defendant Nessa Kaplan has no right, title or interest in, and plaintiff is entitled to receive 100% of, the death benefit payable by defendant Teachers’ Retirement System of the City of New York from the account of decedent Daniel Kaplan, without costs.
In January 1991, plaintiff, Sondra Kaplan, brought this action for a declaratory judgment establishing her right to, and interest in, 100% of the death benefit payable by defendant Teachers’ Retirement System of the City of New York from the account of her deceased former husband, Daniel Kaplan. The designation of beneficiary form executed by the decedent on January 30, 1989, named plaintiff 41.5% beneficiary of the death benefits, and defendant Nessa Kaplan, decedent’s second wife, beneficiary of the remaining 58.5%.
In support of her claim, plaintiff asserted that the designation of beneficiary was in violation of a separation agreement, executed on November 19, 1984, and incorporated into the judgment of divorce entered on May 16, 1985, which mandated that she be designated as irrevocable beneficiary of 100% of any death benefit due to Daniel Kaplan upon his death. She alleged that it was partially in consideration of this promise that she had waived her rights to equitable distribution of decedent’s other assets and to maintenance. In pertinent part, the agreement stated as follows: "[The husband and the wife] together shall choose the option to collect [the husband’s] pension which shall give to the [wife] maximum benefits upon the [husband’s] death and the [husband] shall name the [wife] as 100% irrevocable beneficiary on said pension upon his death.”
Title 13 of the Administrative Code of the City of New York specifies, at section 13-561, that public retirement fund benefits are "exempt from levy and sale, garnishment, attachment or any other process whatsoever, and shall be unassignable”. *180Thus, it has long been held that, under most circumstances, irrespective of perceived inequity, the designation of a beneficiary under such plan may not be defeated, even by a prior agreement which purports to be irrevocable (Caravaggio v Retirement Bd., 36 NY2d 348; Heitner v Heitner, 155 AD2d 282).
Nevertheless, in Majauskas v Majauskas (61 NY2d 481), the Court of Appeals held that, under the law of equitable distribution, pension rights such as the ones involved herein are marital property, subject to distribution. The court distinguished Caravaggio (supra), stating that the type of anti-assignment provisions found in both of those cases, as well as in the instant case, "have been consistently construed not to have the effect of depriving the nonemployee spouse of the rights accorded him or her upon dissolution of the marriage by a decree of divorce” (supra, at 493). Among the "rights” to which the court was clearly referring were the rights which the nonemployee may have had in an employee spouse’s pension, which, it held, "are independent of those of the employee,” and which include the potential right to a death benefit such as the one involved herein (supra, at 491).
Initially, we find no basis to hold, as argued by defendant, that both the within case and Caravaggio (supra) are distinguishable from Majauskas (supra) on the ground that they involve a settlement agreement while Majauskas involved a court ordered distribution. Indeed, a settlement agreement was also involved in Matter of Spadaro v New York City Police Dept. Pension Serv. (115 Misc 2d 494 [Stecher, J.]), which was cited favorably by the Court of Appeals in Majauskas (supra, at 493). In any case, the Equitable Distribution Law specifically provides that "[a]n agreement by the parties, made before or during the marriage, shall be valid and enforceable in a matrimonial action if such agreement is in writing, subscribed by the parties, and acknowledged or proven in the manner required to entitle a deed to be recorded. Such an agreement may include * * * (2) provision for the ownership, division or distribution of separate and marital property” (Domestic Relations Law § 236 [B] [3]). While, as defendant points out, the within action is not a "matrimonial action,” we find no rational basis to hold that the court’s ability in the within action to enforce a prior distribution of marital property made pursuant to the Equitable Distribution Law is diminished merely because the parties agreed to it rather than were ordered to accept it by the court. To hold otherwise would essentially foreclose the possibility of settlement in any *181case in which a pension were part of the marital property, for, even if the parties were able to amicably agree to its distribution, they would not be able to assure that their agreement would be upheld. Since we find no basis to hold that the principles enunciated in Majauskas (supra) are limited to court ordered distribution, and since essentially the same type of pension rights were involved in both Caravaggio (supra) and Majauskas, we must conclude that the significant distinguishing factor upon which the Majauskas court was relying was the fact that, in Caravaggio, the court was confronted by a divorce which had not been negotiated under the law of equitable distribution.
In this context it is important to keep in mind that, while prior to equitable distribution and the institution of the concept of "marital property,” an anti-assignment statute could bar the enforcement of a property settlement in a separation agreement (Caravaggio v Retirement Bd., supra), it could not bar an attachment based on a failure to pay alimony (Monck v Monck, 184 App Div 656; Zwingmann v Zwingmann, 150 App Div 358). This distinction gains meaning when it is recalled that, prior to equitable distribution, the purpose of a distribution of property upon the termination of a marriage was vastly different than after the passage of that statute (O’Brien v O’Brien, 66 NY2d 576, 587). Most significantly, such a distribution could not, as it may now, stand in the place of an ongoing support obligation which formerly was provided for by an award of alimony (see, McDermott v McDermott, 119 AD2d 370, appeal dismissed 69 NY2d 1028, for extended discussion of changes wrought by equitable distribution in this context; see also, Matter of Spadaro v New York City Police Dept. Pension Serv., 115 Misc 2d 494, supra). Since, under equitable distribution, a spouse may very well accept, or the court may order, a distribution in lieu of such ongoing maintenance, such a distribution now comes within the exception to anti-assignment statutes for support obligations which, if not enforced, would "have the effect of depriving the nonemployee spouse of the rights accorded him or her upon dissolution of the marriage by a decree of divorce” (Majauskas v Majauskas, supra, at 493).
Of course, the exception to the provisions of such anti-assignment statutes provided by marital rights is a narrow one, solely enforceable by the actual recipient of the pension benefits as marital property under the equitable distribution statute or as a source of alimony under other statutes (cf., Heitner v Heitner, supra [anti-assignment statute bars enforce*182ment by decedent’s child of agreement providing for a death benefit payment]).
Finally, we do not find that Majauskas (supra) is distinguishable from the instant situation because here, the nonemployee spouse is attempting to enforce the agreement against the pension plan administrator, rather than against the employee spouse. Indeed, in Majauskas, the court noted that the judgment enjoined the employee spouse’s pension plan administrator to withhold certain sums from the employee’s benefits if it was notified that the nonemployee spouse had not been paid the amounts provided for in the judgment (supra, at 487; see also, Matter of Spadaro v New York City Police Dept. Pension Serv., supra).
For these reasons, we find that plaintiffs first cause of action seeking a declaratory judgment that she is entitled to receive 100% of the death benefit payable by defendant Teachers’ Retirement System of the City of New York from the account of her deceased former husband should not have been dismissed on the ground that it is barred by Administrative Code § 13-561. Moreover, we find that there are no material issues of fact arising out of this cause of action and that plaintiffs motion for summary judgment should therefore have been granted.
Inasmuch as we are granting plaintiff summary judgment on her first cause of action for a declaratory judgment, it is not necessary to reach the second cause of action sounding in breach of contract against decedent’s estate. We note that, were we to reach this issue, we would find that this cause of action should also be reinstated. Concur—Murphy, P. J., Rosenberger, Ellerin, Kupferman and Kassal, JJ.