*218OPINION OF THE COURT
William J. Davis, J.Motion and cross motions are decided as follows:
This is an action commenced by plaintiff Boston Trade Bank (hereinafter Boston), to effect collection of sums alleged to be due and owing upon a mortgage given by defendant Kuzon. The mortgage was recorded and constitutes a lien against a certain condominium apartment (unit 8A), located at 216-218 East 47th Street in New York County.
Defendant Community Savings Bank, referred to in these proceedings as Heritage Bank for Savings (hereinafter Heritage), contends that defendant Kuzon likewise gave a mortgage upon the aforementioned premises to it. In its answer, counterclaims and cross claims, Heritage sets forth that its mortgage was recorded prior to all other liens upon the apartment at issue.
Defendant Citibank has also served an answer containing cross claims and counterclaims. Citibank was the original mortgagee upon the premises owned by defendant and mortgagor Kuzon, pursuant to a mortgage of August 16,1985.
The submitted papers establish that in the context of the sale of apartment 8A to defendants and purchasers Bruce Zeitzer and Gail Zeitzer (hereinafter Zeitzers), the original mortgage upon the premises was satisfied, and a new mortgage meant to constitute a lien upon apartment 8A and the adjoining apartment 8B was given by the Zeitzers to Citibank.
In 1987 the Zeitzers entered into contracts to purchase two condominium apartments at 216 East 47th Street. Apartment 8A at that location was to be purchased from defendant Ronald Kuzon. The Zeitzers also contracted to purchase the adjoining unit, apartment 8B, from the condominium’s sponsor. The closing of the sale took place on February 25, 1988.
At the closing, the only mortgage recorded as against apartment 8A, originally held by Citibank, was satisfied as the result of proceeds disbursed in connection with the mortgage given by the Zeitzers to Citibank. The satisfaction relative to the mortgage given by Kuzon to Citibank was executed on March 4, 1988 and duly recorded on March 23, 1988.
A mortgage of February 3, 1988 given to defendant Heritage was recorded as against apartment 8A on March 1, 1988, and a February 16, 1988 mortgage given to Boston was recorded as against the same premises on March 17, 1988. The Heritage *219mortgage was given "subject to mortgages of record if in force and applicable.” The Boston mortgage was given subject to the Citibank August 16, 1985 mortgage. Defendant Citibank’s mortgage as against apartments 8A and 8B was recorded on July 14, 1988. Apartments 8A and 8B have been physically combined although they remain separate tax lots, with separate deeds for each of the apartments.
It appears defendant Kuzon is in default of his financial obligations to Boston and Heritage. However, he alleges, in an affidavit annexed to the Heritage reply memorandum of law, that the Zeitzers had knowledge of the Boston and Heritage mortgages. There are also significant common charges of the Zeitzers which are due and outstanding to the Octavia Condominium.
Defendant Citibank moves for summary judgment (CPLR 3212) seeking declaratory relief, pursuant to the doctrine of equitable subrogation, declaring its mortgage lien upon apartment 8A to be superior to those of defendants Heritage and Boston. Citibank further seeks a declaration that its mortgage lien is in any event superior to the liens of Heritage and Boston with regard to condominium unit 8B.
Boston and defendant Heritage cross-move for summary judgment to establish the priority of their mortgage liens over that of Citibank.
The board of managers of the Octavia Condominium as additional defendant upon the counterclaim, in an affirmation herewith deemed for the purposes of judicial economy to be a cross motion, seeks declaratory relief, declaring that unpaid common charges due the condominium from the Zeitzers have priority for collection over any of the mortgage liens which may ultimately be declared to be first in line.
In New York, by statute the priority of mortgage liens are determined by the order in which same are recorded (Real Property Law § 291). This procedure, known as "race-notice,” gives priority to the lienor who lacks knowledge of the outstanding lien and wins the race to record (Goldstein v Gold, 106 AD2d 100 [2d Dept 1984], affd 66 NY2d 624 [1985]). However, there are situations where priority established under the aforementioned "race-notice” statute may be set aside by a court, dependent upon principles of justice and equity as applicable to a particular situation (King v Pelkofski, 24 AD2d 1003 [2d Dept 1965], mod on other grounds 20 NY2d 326 [1967]). In appropriate circumstances, a court in equity will *220subrogate the rights of the subsequent lienholder so as to place such a creditor into the shoes of the prior creditor (supra, 24 AD2d, at 1004).
The doctrine of equitable subrogation plays upon notions of fairness to preclude situations where a party might be unjustly enriched by the acts of another in discharging an existing lien, placing another unknown lienholder in a superior position. (King v Pelkofski, supra, 20 NY2d, at 333-334; see also, 78 NY Jur 2d, Mortgages and Deeds of Trust, § 345.)
In the situation presented to this court, Citibank acted to discharge defendant Kuzon from his mortgage obligation relative to apartment 8A, by taking a mortgage back upon the premises from the Zeitzers when the sale of apartment 8A closed. At such time as defendant Kuzon’s mortgage indebtedness was discharged, said defendant no longer had any equitable ownership interest in apartment 8A. Further, both Boston and Heritage took their mortgages from Kuzon with knowledge of a preexisting lien as the original Citibank lien had been recorded years earlier. The court therefore finds that it would be inequitable to allow Boston and Heritage to retain their priority of lien inasmuch as Kuzon would be unjustly enriched to the extent that his indebtedness to Boston and Heritage might be discharged through the ultimate sale of a premises, in which Kuzon no longer had any ownership interest.
The court further finds without merit any contention that Boston and Heritage’s liens could be superior to Citibank’s mortgage lien with respect to apartment 8B. The court as a matter of equity will not permit defendant Kuzon to be enriched through the discharge of any of his indebtedness, as the result of the sale of apartment 8B, since defendant never had any equitable ownership interest in those premises. Moreover, Heritage and Boston present an insufficient basis in law or fact to allow their mortgage liens to be applied to apartment 8B. The submitted papers establish that apartment 8B is separately deeded to the Zeitzers and the premises remains a separate tax lot. In addition, Heritage and Boston have failed to establish that the mortgage agreements they have from defendant Kuzon in any way extends to apartment 8B, or that they ever recorded their liens upon the premises prior to Citibank recording its lien thereon.
The court by reason of the foregoing grants Citibank’s motion for summary judgment for declaratory relief, and *221declares Citibank’s liens upon apartments 8A and 8B to be superior to all other recorded liens, as a matter of law.
The cross motions by Boston and Heritage, seeking declaration of the priority of their mortgage liens over those of Citibank, are denied.
The application by the board of managers of the Octavia Condominium, to have its lien for outstanding condominium charges due and owing by the Zeitzers to be declared superior to all outstanding recorded liens, is denied. The foregoing lien shall have priority in accordance with Real Property Law § 339-z, and all other relevant statutes and principles of law.