
24 Cal.App.4th 1702 (1994)
30 Cal. Rptr.2d 306
In re the Marriage of MARY E. and GEORGE L. OLSEN.
MARY E. OLSEN, Respondent,
v.
GEORGE L. OLSEN, Appellant.
Docket No. B073657.
Court of Appeals of California, Second District, Division Six.
May 18, 1994.
*1703 COUNSEL
Lloyd E. Somogyi for Appellant.
Douglas C. Michie for Respondent.
OPINION
STONE (S.J.), P.J.
In a partition action of the husband's military retirement benefits, the trial court ordered that in order to receive her share of the *1704 benefits, the wife had to waive further spousal support, which she did. Congress later took away her interest in her ex-husband's military retirement benefits. (1a) Here we affirm the trial court and hold that the trial court had jurisdiction to order spousal support in 1993 even though it had terminated spousal support in 1989 with no retention of jurisdiction. The trial court has inherent power to do justice when an unforeseen change in the law destroys the effect of a prior order.
George Olsen appeals from a January 23, 1993 postjudgment order of the San Luis Obispo Superior Court awarding Mary Olsen $400 in spousal support until his death, her death, or her remarriage. He contends that the court lacked jurisdiction to make the award due to its earlier order of termination of jurisdiction, that the prior order terminating spousal support was res judicata, and that nothing in the 1990 Federal Uniformed Services Former Spouse Protective Act (FUSFSPA) amendment warranted reinstatement of spousal support.[1]

FACTS
The parties were married April 25, 1947, and separated May 5, 1974. They entered into a stipulated marital settlement agreement which was incorporated in the interlocutory judgment. The agreement provided that George would pay $200 per month child support for the one minor child remaining at home and $400 per month spousal support "for a period not to exceed eleven (11) years from the date of the Interlocutory Decree of Dissolution or until the death or remarriage of Petitioner whichever first occurs." The agreement was silent regarding George's military pension for his service as an officer in the United States Air Force and any pension rights he might have accrued at date of separation due to his employment by the Federal Aeronautics Administration (FAA) as an air traffic controller.
May 28, 1985, Mary filed a motion to increase spousal support to $400, which support had decreased to $300 per month when their child reached majority, and to extend George's obligation to pay for an indefinite time. The trial court found the spousal support provision of the marital settlement agreement ambiguous and continued George's spousal support obligation for an indefinite period. In 1988 Mary filed an independent partition action to establish her property interest in George's military pension.[2]
George defended against her suit on grounds that Mary had been aware of her community interest in the pension at the time of their stipulated property *1705 settlement agreement and had agreed she would not claim any interest in return for other consideration. The court found Mary had a 41 percent interest in the military pension. Since her share, then over $700 per month, was more than the spousal support she was receiving, the court conditioned her receipt of the pension benefit upon her waiver of spousal support. The court did not, however, order that Mary was to receive any part of the sums already received by George.
July 14, 1989, Mary filed a waiver of spousal support in the dissolution action as follows: "Petitioner declares by this request that she knowingly, intelligently, and voluntarily waives any right to spousal support she may have after July 31, 1989, and understands that said support will be terminated and she will never again be able to claim spousal support." The court entered the following order: "IT IS HEREBY ORDERED that spousal support previously ordered shall now be modified and terminated, and that the court shall not retain jurisdiction to modify or award spousal support after July 31, 1989. [¶] THIS ORDER is based on the judgment filed in Olsen v. Olsen, Case No. 64922."
Congress amended the FUSFSPA of 1982 to provide that effective November 8, 1990, a court could not treat retired pay as property in any proceeding to divide or partition any amount of retired pay of a member as the property of the member and the member's spouse or former spouse if a final decree of divorce, dissolution, annulment or legal separation affecting the member and the member's spouse was issued before June 25, 1981, and did not treat, or reserve jurisdiction to treat, any amount of retired pay of the member as property of the member and the member's spouse or former spouse. (10 U.S.C. § 1408(c)(1).)
Faced with the prospect of now being without her share of the monthly pension and having waived spousal support, Mary went back to court and asked it to fashion a remedy to allow her to have either her share of the pension or spousal support. The court ordered George to pay Mary $400 per month for spousal support until the death of either party or Mary's remarriage.

DISCUSSION

1. Jurisdiction to Award Spousal Support

George asserts that once an order for payment of spousal support has lapsed or terminated with no reservation of jurisdiction to award further support, the court has no power to modify the judgment by again awarding *1706 spousal support. (See generally, Tolle v. Superior Court (1937) 10 Cal.2d 95 [73 P.2d 607]; Long v. Long (1941) 17 Cal.2d 409 [110 P.2d 383]; In re Marriage of Segel (1986) 177 Cal. App.3d 1030, 1041-1041 [223 Cal. Rptr. 430]; In re Marriage of Foreman (1986) 183 Cal. App.3d 129 [228 Cal. Rptr. 4].) Since the order of July 14, 1989, unconditionally terminated Mary's spousal support award, George contends the court acted in excess of its jurisdiction in making the order of January 29, 1993.
(2) Spousal support is modifiable unless the agreement or decree contains specific language making it nonmodifiable. (In re Marriage of Foreman, supra, 183 Cal. App.3d at p. 131.) The California Supreme Court has held that where the wording of an order is not explicit but a retention of jurisdiction may reasonably be implied, a court should not terminate jurisdiction "`unless the record clearly indicates that the supported spouse will be able to adequately meet his or her financial needs at the time selected for termination of jurisdiction....'" (In re Marriage of Vomacka (1984) 36 Cal.3d 459, 467 [204 Cal. Rptr. 568, 683 P.2d 248], fn. omitted; see also In re Marriage of Benson (1985) 171 Cal. App.3d 907, 909, 912-913 [217 Cal. Rptr. 589].) It was on this basis that the trial court originally continued George's obligation to pay spousal support in 1985. Mary had been a homemaker and had entered the job market for the first time as a minimum-wage earner. She had a continued need for support, and the wording in the stipulated agreement was ambiguous.
(1b) When Mary filed her complaint for partition and accounting, Congress had legislatively overturned the United States Supreme Court's pronouncement in McCarty v. McCarty (1981) 453 U.S. 210 [69 L.Ed.2d 589, 101 S.Ct. 2728], that a state court could not divide a military pension as community property or quasi-community property because the federal scheme of military retirement benefits preempts state community property law. Under FUSFSPA, a state court could treat disposable retired or retainer pay payable to a member for pay periods beginning after June 25, 1981, either as property solely of the member or as property of the member and his spouse according to the law of the jurisdiction. (10 U.S.C. § 1408(c)(1).)
The trial court determined that Mary should not be entitled to both spousal support and $700 per month in pension benefits as she was now gainfully employed and George was no longer employed, nor was his present wife. Thus the court imposed an election on Mary and reserved jurisdiction "to make such other and further orders as are necessary to do justice."[3]
(3a) Under certain circumstances a court, sitting in equity, can set aside or modify a valid final judgment obtained by fraud, mistake, or accident, *1707 either in an independent action in equity or on a motion in the original action. (Kulchar v. Kulchar (1969) 1 Cal.3d 467, 470 [82 Cal. Rptr. 489, 462 P.2d 17, 39 A.L.R.3d 1368]; In re Marriage of Baltins (1989) 212 Cal. App.3d 66, 81 [260 Cal. Rptr. 403]; see also In re Marriage of Stevenot (1984) 154 Cal. App.3d 1051 [202 Cal. Rptr. 116].) (1c) Mary brought her application for order to show cause, upon which the court's award of 1993 was based, in the original dissolution action since it was in that action that she had agreed to waive and terminate spousal support. Her waiver, however, was predicated upon the court's order in the partition action. Her application was, essentially, a request for equitable relief. Both the trial court and Mary had labored under the mistake of fact that she would be able to collect her monthly share of the pension until her death and the mistake of law that Congress would allow her to do so. Her election to waive spousal support was specifically conditioned, under the court's order, on receipt of her share of military benefits.
The court concluded that Mary's waiver of spousal support was, for all practical purposes, unknowing and illusory. (See In re Marriage of Moore (1980) 113 Cal. App.3d 22, 27 [169 Cal. Rptr. 619].) The court could, in its equitable powers, set aside its former order as having been made through mistake and issue a new order.[4] George points out that the trial court did not set aside its former order, nor did Mary specifically attack that order or request that it be set aside. However inartful Mary's moving papers might have been, she did request equitable relief and the court was within its discretion to grant it. Although the court's tentative decision and judgment did not specifically set aside the former order, it is clear from the court's ruling that that was the court's intention. The new order supplanted the former order, a remedy for the earlier wrong. (See Civ. Code, § 3523.)
The prior order was not res judicata on Mary's entitlement to a further award of spousal support. (3b) Where exceptional circumstances require that the consequences of res judicata be denied, the court can grant relief. (In re Marriage of Stevenot, supra, 154 Cal. App.3d at p. 1071.) (1d) Mary was not negligent in failing to discover facts or law. Neither Mary nor the court could envision that Congress would soon take away what it had so swiftly given on the heels of McCarty.


*1708 2. FUSFSPA Provided Grounds for Court's Order

George argues that nothing in the 1990 FUSFSPA amendment warranted reinstatement of spousal support since if it were not for Congress, Mary would not at anytime have had any basis for making claim to any part of his retirement. He harks back to their original stipulation that Mary would receive spousal support for 11 years and that she "improved" her situation by taking advantage of developments in California law. He also asserts that at the time of the court's order in January 1993, and at the time Congress effected its amendment to FUSFSPA in 1990, the order of July 14, 1989, had long become final. He asserts there is no legal or equitable basis for an award where jurisdiction was given up three years earlier.
George forgets that the trial court had extended jurisdiction over spousal support in 1985 and that order was unchallenged. Thus the court had continuing jurisdiction over the issue of spousal support. There is nothing inequitable in allowing the court to set aside the order of 1989 based upon a law that later evaporated. To paraphrase a well-known maxim, when the reason for the ruling ceases, so should the rule itself. (Civ. Code, § 3510.) The overall policy of the law is fairness. (See Gardiner Solder Co. v. SupAlloy Corp., Inc. (1991) 232 Cal. App.3d 1537, 1543 [284 Cal. Rptr. 206].)
Essentially George is in the same position in which he was before Mary filed her action for partition of the military pension. While she may have benefited for a short time from FUSFSPA, George has benefited by Congress's recognition that his military benefits, unmentioned and undivided in the 1974 final judgment of dissolution, are now totally his. The 1990 amendment to FUSFSPA retroactively deprived Mary of the benefits the court granted her in 1989. Thus it provided a basis for disturbing the court's order of 1989.
The order is affirmed. Each party to bear his and her own costs.
Gilbert, J., and Yegan, J., concurred.
Appellant's petition for review by the Supreme Court was denied September 7, 1994.
NOTES
[1]  We will refer to the parties by their first names for purposes of clarity, and not out of disrespect.
[2]  George had retired and had to elect between the FAA and military pension. He chose the military pension and received a lump sum cashout from the FAA.
[3]  We granted Mary's request to take judicial notice of the orders and documents filed in her partition action, case No. 64922.
[4]  In re Marriage of Mansell (1989) 217 Cal. App.3d 219 [265 Cal. Rptr. 227], is distinguishable. In Mansell, the parties believed at the time of their interlocutory and final judgments that military disability pay was divisible as community property, a belief at that time correct. (Id., at p. 234.) The reviewing court held that a mutual mistake of law alleged by the husband would not allow him to later set aside the judgment since a "postjudgment, nonretroactive reinterpretation of the law is not a basis for disturbing a final judgment." (Ibid.) Here the court itself forced the waiver of spousal support to which she would have otherwise been entitled under the court's prior order.
