The opinion of the court was delivered by
Raymond DiPrima appeals from an order denying his application to intervene with respect to the proceeds of a foreclosure judgment and sale and denying him entitlement to any of the surplus funds.
The property owned by defendants Nicolaou was brought into foreclosure by Morsemere Federal Savings & Loan Association (Morsemere) and a final judgment of foreclosure entered *641on May 31, 1983 under a July 8, 1981 mortgage held by Morsemere.1 Subsequent to the foreclosure judgment DiPrima obtained a default judgment against George Nicolaou solely, in the amount of $13,216.99, which was filed February 7, 1984. Nicolaou instituted a bankruptcy proceeding which was apparently dismissed in September 1984 without discharging the amount owed DiPrima.
On October 12, 1984 a foreclosure sale was held by the Bergen County Sheriff and DiPrima purchased the property for $170,000. DiPrima then filed a motion seeking to intervene in the foreclosure action and for payment of surplus funds from the sheriff’s sale, as well as certain additional relief.2 This motion was denied in its entirety in an order entered March 6, 1985.
DiPrima is not only the purchaser at the foreclosure sale, but a post-foreclosure judgment creditor for $13,216.99. He is subsequent in priority to lienholders whose liens were perfected at the time of the foreclosure judgment. The fair market value of the foreclosed property was not established because the issue was not raised below, although according to respondent’s brief, when the attorney for the Nicolaous inquired of DiPrima’s attorney about repurchasing the property, he was advised that a purchase price of between $200,000 and $225,000 would be considered.
We are satisfied that a lien claimant cannot be made a party to a foreclosure suit after the final decree. New Home Building & Loan Ass’n v. Wel-Bilt Construction Co., 98 N.J.Eq. 545, 547 (Ch.1926). N.J.S.A. 2A:50-30 does not apply to *642allow DiPrima to intervene as a party here because DiPrima’s lien did not exist “at the time of the filing of the complaint” or even at the time the foreclosure judgment was entered.
However, a different situation exists regarding a claim to participate in any surplus by a creditor who obtains a judgment subsequent to the' foreclosure judgment. Such a judgment creditor may participate in any surplus after prior claiming lienholders (at the time of the foreclosure judgment) have been paid or satisfied. Although we incline to the view that monies held in the custody of the court should not be subject to levy, except through process or court order in the same action as the money was deposited, see Western Savings Fund Society of Philadelphia v. Goodman, 103 N.J.Super. 307, 313-314 (Ch. Div.1968), it appears that that may have been permitted in Vineland Savings & Loan Ass’n v. Felmey, 12 N.J.Super. 384 (Ch.Div.1950), on the ground that no substantial confusion or embarrassment resulted in that situation. See 33 C.J.S. Execution § 55, p. 187 (1942). R. 1:13-8 provides:
The priorities of parties’ liens and encumbrances are fixed and determined as of the date of the commencement of the action, unless the parties otherwise agree or it is otherwise adjudicated in the action or any other action.
This rule accords with the general rule elsewhere. 59 C.J.S. Mortgages, § 800b (1949).
It is generally acknowledged that surplus funds take on the character of the land, at least with respect to junior encumbrancers whose liens existed at the time of the foreclosure. See, e.g. Western Savings Fund Society of Philadelphia v. Goodman, supra, 103 N.J.Super. at 314; Morris v. Glaser, 106 N.J.Eq. 585 (Ch. 1930), aff'd 110 N.J.Eq. 661 (E. & A.1932); Zelley v. Zelley, 101 N.J.Eq. 37 (Ch. 1927). We need not decide whether surplus funds paid into court retain the same character with respect to the application of a post-foreclosure judgment creditor in situations such as that involved in this case. Cf. Fort Lee Sav. & Loan Ass’n v. LiButti, 106 *643 N.J.Super. 211 (App.Div.1969), reversed on dissenting opinion, 55 N.J. 532 (1970). In our view, N.J.S.A. 2A:50-37 is controlling and allows a subsequent judgment creditor to apply to share in the surplus funds. That statute states:
The sheriff or other officer to whom a writ of execution under section 2A:50-36 of this title shall be directed and delivered shall make sale pursuant to the command of such writ, and shall make and execute a deed or deeds for the premises sold, as the ease may require; but no greater estate in the premises sold shall, at any time, be granted to a purchaser than would have been vested in the mortgagee had the equity of redemption been duly foreclosed.
The moneys arising from a sale pursuant to this section shall be applied to pay off and discharge the moneys ordered to be paid, and the surplus, if any, shall be deposited with the court and the same shall be paid to the person or persons entitled thereto, upon application therefor, as the court shall determine. Such surplus moneys may be invested at interest on such security as the court shall order pending application therefor by the person or persons entitled thereto. * " (Emphasis supplied.)
Upon establishing entitlement, applications under that statute should be granted. No reasons for precluding such application was articulated by the trial judge. We conclude that, provided prior lienholders are paid or satisfied, and subject to the requirement regarding fair market value discussed hereafter, DiPrima was erroneously denied an opportunity to assert his post-foreclosure judgment against that portion of the surplus funds which would be otherwise payable to George Nicolaou.3
That conclusion does not fully resolve the matter. Even though respondents opposed the appeal and had not requested a fair market value hearing, we are of the view that *644in fairness and equity they, as former mortgagors, should be given the opportunity to establish the fair market value of the property which was purchased at the foreclosure sale by DiPrima, the judgment creditor, so that they may obtain any available credit against the amount due on the judgment. N.J.S.A. 2A:50-30 indicates that subsequent lienholders are bound by the foreclosure judgment. See, generally, Cunningham & Tischler, 30 N.J.P., Mortgages §§ 381 and 396 (1975). With respect to the holder of any bond or note given in connection with a mortgage, who is also the purchaser at the foreclosure sale, we note that N.J.S.A. 2A:50-3 gives a mortgagor the right to dispute a claim of deficiency and determine the fair market value of the premises. A court of equity, on application to it, could well apply the same deficiency rule as contained in N.J.S.A. 2A:50-3 to the situation presented here. DiPrima’s application is in a context analogous to that where a deficiency arises on a note or mortgage. Compare N.J.S.A. 2A:50-3 and N.J.S.A. 2A:50-22 and 30. DiPrima is the purchaser at the .foreclosure and also holds an unsatisfied judgment as to George Nicolaou.
Historically, legislation has been successively adopted over the years to deal with the problem of deficiencies arising as a result of a mortgage foreclosure action. Cunningham and Tischler, 30 N.J.P., supra § 396. Although N.J.S.A. 2A:50-3 does not by its express terms extend to a subsequent judgment creditor, we must consider nonetheless whether overriding equitable considerations exist, or whether there is a discernable probable legislative intent. See N.J. Builders, Owners & Managers Assoc. v. Blair, 60 N.J. 330, 338-340 (1972); Dvorkin v. Dover Tp., 29 N.J. 303, 313-315 (1959). Where property is sold to a holder of the subsequent obligation, by analogy to and in accord with the spirit of N.J.S.A. 2A:50-3, the debtor in the foreclosure action should be entitled to show the fair market value of the property and obtain a credit *645against the amount due on the judgment. Likewise, we see no reason why a court of equity should not condition its award of relief to an applying creditor to prevent a possible double recovery or windfall, where the judgment creditor has purchased the property.4 A court of equity has the inherent power to prevent a potential double recovery or windfall to the judgment creditor who not only may profit on the purchase of the property at the foreclosure sale (if purchased for less than fair market value), but who also seeks to obtain satisfaction of his judgment. See Hudson City Savings Bank v. Hampton Gardens Ltd., 88 N.J. 16, 25 (1981). Courts of equitable jurisdiction have wide discretion to condition relief that is granted to a litigant. See, e.g., Newman v. Chase, 70 N.J. 254, 264 (1976); Totowa Savings & Loan Ass’n v. Crescione, 144 N.J.Super. 347, 352 (1976). Obviously, one who seeks the intervention of a court of equity must do equity. Leisure Technology v. Klingbeil Holding Co., 137 N.J.Super. 353, 356 (App.Div.1975); Brick Township, Ocean County v. Vannell, 55 N.J.Super. 583, 595 (App.Div.1959). Thus, if DiPrima seeks to enforce his judgment against the surplus funds, a hearing is required on the issue of the fair market value of the property purchased by him at the foreclosure sale. If the fair market value of the house purchased by DiPrima at that sale then exceeded the amount that he paid for it then George Nicolaou would be entitled to receive an appropriate credit against any amount owed on DiPrima’s judgment.
Accordingly, we affirm the denial of intervention. We reverse the order of the Chancery Division denying DiPrima’s application to assert his claim against George Nicolaou’s interest in the surplus funds. We affirm as to Christine G. Nicolaou. We remand to the trial court for further proceedings, consistent with this opinion, as may be required.