OPINION OF THE COURT
Sullivan, J.At issue are a mortgagor’s and mortgagee’s competing claims to the insurance proceeds for damage to the mortgaged premises from fire.
*361On February 26, 1971 plaintiff, to secure advances to it by the City of New York for the rehabilitation of its building at 348-350 East 119th Street, New York City, executed a mortgage in favor of the city, consolidating two prior mortgages into one lien of $472,000. The mortgage expressly provided “[t]hat the mortgagor will keep the buildings on the premises insured against loss by fire for the benefit of the mortgagee”. The two fire insurance policies involved herein, each of which designated the city as the loss payee in the mortgagee clause, were procured by the city.
On December 7, 1972, during the term of each of these policies, the covered premises were partially damaged by fire. For reasons that are neither disclosed in this record nor germane to resolution of the present controversy, both fire insurers disclaimed liability. Plaintiff thereafter commenced the instant action against the insurers; it also joined the city1 and Bayly, Martin & Fay, Inc., the broker, against both of whom it alleged negligence in the placement of the insurance.
As of November 30, 1972, one week before the fire, plaintiff was already $30,367.59 in default under the mortgage. Ultimately, and while this action was pending, the city declared the entire unpaid balance of the mortgage indebtedness due and payable because of plaintiff’s continuing and increasing default. In the course of the city’s mortgage foreclosure action, commenced on or about March 18, 1974, a referee computed the amount due on principal and interest, as of September 15, 1976, at $529,411.54. The referee’s report was confirmed and a judgment entered on May 20, 1977 directing a sale of the mortgaged premises. The sale was never held, however, because the city in the interim, had acquired title to the premises by an in rem foreclosure of the outstanding tax liens on the property. Parenthetically, it should be noted, the failure to pay real estate taxes on the property constituted a further default under the mortgage.
*362The within action was eventually settled on January 12, 1981 for $30,000, to which the insurers contributed $23,000 and Bayly, Martin $7,000, pursuant to a stipulation that the settlement fund would be distributed in accordance with the further order of the court. The cross claims against the city were withdrawn. Plaintiff, claiming entitlement to the insurance proceeds since it repaired and restored the premises to its prefire condition, thereafter moved for an order directing payment to it of the settlement fund. The city, alleging that since plaintiff was in default under the mortgage it was not entitled under subdivision 4 of section 254 of the Real Property Law to any portion of the insurance proceeds, notwithstanding any repairs it might have made to the damaged premises, cross-moved for an order directing payment of the insurers’ $23,000 settlement contribution to the city as the loss payee in the mortgagee clause of the respective policies. The city further alleged that even assuming, arguendo, that plaintiff’s default in its mortgage obligations did not bar it from sharing in the insurance proceeds, plaintiff nevertheless failed to demonstrate sufficiently that it repaired the damage to the insured premises. Finding, we believe erroneously, that the city’s rights as mortgagee were extinguished when, in its capacity as a taxing authority, it foreclosed on the property in an in rem proceeding, Special Term granted plaintiff’s motion, denied the cross motion and directed that the entire settlement fund be paid to plaintiff.
It is well settled that while, ordinarily, the rights of a mortgagee named in the standard mortgagee clause of a fire policy are determined as of the time of the loss, where, subsequent to the fire, the debt has been satisfied in full by purchase at a foreclosure sale, either by the mortgagee or a stranger, the mortgagee’s insurable interest terminates and it may not recover under the policy. (Whitestone Sav. & Loan Assn. v Allstate Ins. Co., 28 NY2d 332; see Heilbrunn v German Alliance Ins. Co. of N. Y., 150 App Div 670, 672, app dsmd 206 NY 683.) But, as Whitestone Sav. & Loan Assn. v Allstate Ins. Co. (28 NY2d 332, supra) makes clear, it is the existence of the mortgage debt, not the lien, that determines whether a designated mortgagee retains an *363insurable interest under a fire insurance policy covering mortgaged premises. Of course, “the bidding in of the debt [by the mortgagee] to purchase the mortgaged property, thus cutting off other lower bidders, has always constituted a satisfaction of the debt”. (Whitestone Sav. & Loan Assn. v Allstate Ins. Co., 28 NY2d, at p 335.) But to the extent that a deficiency exists after foreclosure and sale, the debt remains, and an insurable interest in the mortgagee as loss payee of the mortgagee clause of the fire policy survives. (Supra, at p 335; see, also, Moke Realty Corp. v Whitestone Sav. & Loan Assn., 82 Misc 2d 396.) That the mortgagee should retain an insurable interest, notwithstanding foreclosure and sale of the property, as long as some portion of the debt remains outstanding, is consistent with the provision in subdivision 4 of section 254 of the Real Property Law that the fire policies insuring the property shall be held by the mortgagee or his representatives “as a collateral and further security” for the payment of the mortgage debt. (See, also, Fields v Western Millers Mut. Fire Ins. Co., 290 NY 209; Morgan v Ellenville Sav. Bank, 55 AD2d 178, 180.)
Plaintiff argues, however, that the mortgage debt as well as the mortgage was extinguished when the city took title to the mortgaged premises through foreclosure of its tax lien. The city’s right, by statute, to foreclose on a tax lien by an action in rein is separate and distinct from its right, as mortgagee, to foreclose on a mortgage lien. Title D of chapter 17 of the Administrative Code of the City of New York provides the city with a summary in rem procedure for the foreclosure of any delinquent “[real estate] tax, assessment, sewer rent * * * or water rent and interest or penalty thereon” (Administrative Code, § D17-1.0, subd l).2 Subdivision b of section D17-10.0 of the Administrative Code provides that an “[a]ction * * * brought pursuant to [title D] shall take precedence over any proceeding brought *364to foreclose a mortgage or other lien involving the same property.” Since, upon execution of the deed by the Finance Administrator in an in rem foreclosure, the city is seized of an estate in fee simple absolute, free of all encumbrances (Administrative Code, § D17-12.0, subd b), and it is not required to account to the prior owner for any surplus above the amount of the tax arrears upon resale of the property,3 in rem foreclosure is in reality a form of forfeiture for tax delinquency.
Where the city is both taxing authority and mortgagee, it is not required to choose its remedy. It has a statutory right to absolute title to property upon which taxes have not been paid, and the exercise of such right cannot diminish its right to recover principal and interest due on its loan to the mortgagor. Nor does RPAPL 1401, which plaintiff claims forbids two actions on a mortgage debt at the same time, prevent the city from suing on two different debts, in two different capacities, tax lienor and mortgagee. If the mortgagee were anyone but the city, no one could seriously argue that such mortgagee was barred from recovery on the loan because title to the property which secured the loan had been taken by the city in an in rem tax foreclosure.
Nor is plaintiff entitled to any portion of the insurance proceeds on the basis of any postfire repairs it might have made. Subdivision 4 of section 254 of the Real Property Law provides that the proceeds of any fire insurance carried by the mortgagor for the mortgagee’s benefit and received by the mortgagee for fire damage to the mortgaged property shall be held by the mortgagee in trust. If the mortgagor notifies the mortgagee in writing within 30 days of the fire that the mortgaged property has been damaged, and the mortgagor “thereafter make[s] good the damage by means of such repairs, restoration or rebuilding as may be necessary to restore the [property] to [its] condition prior to the damage” (Real Property Law, § 254, *365subd 4, par [a]), then upon presentation of sufficient proof of such repairs the mortgagee is required to pay over to the mortgagor from the insurance proceeds the lesser of (a) the reasonable cost of such repairs or (b) the amount actually paid by the mortgagor therefor. Any excess is to be applied to reduce the principal of the mortgage. Section 254 (subd 4, par [a]) further provides, however, “that if and so long as there exists any default by the mortgagor in the performance of any of the terms or provisions of the mortgage on his part to be performed the mortgagee shall not be obligated to pay over any of said insurance money received by him.” Finally the statute provides that if “the mortgagor shall fail to comply with any of [its] * * * provisions * * * or if the entire principal of the mortgage shall have become payable by reason of default or maturity, the mortgagee shall apply said insurance money in satisfaction or reduction of the principal of the mortgage; and any excess of said insurance money over the amount required to satisfy the mortgage shall be paid to the mortgagor.”
Thus, under subdivision 4 of section 254 a defaulting mortgagor is not entitled to the insurance proceeds of a fire policy maintained for the benefit of the mortgagee, even if it restored the premises. In such circumstances, the mortgagee, to the extent of its lien, is entitled to the fire insurance proceeds. As the record discloses plaintiff was already $30,367.59 in default at the time of the fire. While that default was temporarily cured approximately 11 months later, subsequent defaults in payment led the city to declare the entire unpaid balance of the mortgage debt due and payable, and to commence, on or about March 18, 1974, a mortgage foreclosure action. As already noted, the referee in the mortgage foreclosure action found that as of September 15, 1976, $529,411.54 was due and owing the city on principal and interest. Since the entire principal of the mortgage debt, which exceeds the $23,000 insurance payment, has been continuously due and payable since at least March 18,1974 by reason of plaintiff’s default, plaintiff has no claim cognizable under subdivision 4 of section 254 to that portion of the settlement fund representing the insurers’ contribution. Of course, the city cannot assert any right to the $7,000 contribution to the settlement by Bayly, Martin for its negligence in placing the insurance.
*366Even if its default on the mortgage did not bar plaintiff’s claim to the insurance proceeds for any repairs it might have made, plaintiff’s proof on this point would be deficient in any event. Section 254 (subd 4, par [a]) requires that the mortgagor present “proof that the damage has been fully made good”, which proof the mortgagee may reject as insufficient. As proof of repair plaintiff submitted a contractor’s cost estimate which, needless to say, hardly constitutes proof that the repairs were actually made. Notably absent are any invoices, bills, receipts or canceled checks to evidence such repairs. But, plaintiff argues, the city would never have certified the final requisition for payment of the loan balance, which it submitted on March 4, 1974, if the fire damage had not been repaired. In this regard, plaintiff also notes that the city was on actual notice of the repairs since it was constantly inspecting the premises to monitor the progress of the rehabilitation which it was financing. Even assuming the point, the record is barren of any evidence that plaintiff expended its own funds, and not the city’s loan advances, to make the repairs. Absent-such proof, plaintiff cannot defeat the city’s right, as mortgagee, under subdivision 4 of section 254 to apply the insurance proceeds for the fire loss in partial satisfaction of the mortgage debt.
One final issue remains. Plaintiff urges that should the city prevail on its claim to the insurers’ contribution to the settlement fund its attorneys are entitled to recover a legal fee from the city since “any and all rights that the City may possess in this case were acquired through the plaintiff and as a result of the efforts of [its] counsel.” This argument ignores the well-settled principle that an attorney may not recover legal fees from persons other than his client merely because such other persons might have benefited from his services. “[A] party who contracts for a lawyer’s services cannot compel contribution for benefits obtained by others as a result of those services.” (Feick v Fleener, 653 F2d 69, 77; see, also, Matter of Loomis, 273 NY 76; Lynn v Agnew, 179 App Div 305, affd sub nom. Lynn v McCann, 226 NY 654.)
On this point plaintiff relies upon an exception to the general rule applicable in instances where a plaintiff *367through his lawsuit has obtained a decree creating a common fund. (See House u Amsdell Brewing & Malting Co., 133 App Div 486, 489; Realty Equities Corp. of N. Y. v Gerosa, 30 Misc 2d 481, 486; Soffer v Glickman, 27 Mise 2d 721.) Allowances in such instances, however, are “appropriate only in exceptional cases and for dominating reasons of justice.” (Sprague v Ticonic Bank, 307 US 161,167.) This is not such a case. The “common fund” doctrine contemplates a situation where a number of persons, all in a nonadversarial position, have a share in a common fund. Here, plaintiff and the city are vying for the proceeds of the insurance policies, each to the exclusion of the other. At all times plaintiff’s attorneys have acted only for plaintiff’s benefit and as the city’s adversary. Indeed, the city is a named defendant in the action.
Accordingly, the order, Supreme Court, New York County (Price, J.), entered December 8, 1981, which, inter alia, granted plaintiff’s motion for an order directing payment of the entire settlement fund to it, should be modified, on the law, without costs or disbursements, to deny plaintiff’s motion, grant the cross motion and direct that the portion of the settlement fund to which the insurers contributed, i.e., $23,000, be paid to defendant City of New York and, except as thus modified, affirmed.
Sandler, J. P., Ross, Fein and Kassal, JJ., concur.
Order, Supreme Court, New York County, entered on December 8, 1981, unanimously modified, on the law, without costs and without disbursements, to deny plaintiff’s motion, grant the cross motion and direct that the portion of the settlement fund to which the insurers contributed, i.e., $23,000, be paid to defendant City of New York and, except as thus modified, affirmed.
. The action against the city was dismissed for noncompliance with section 50-e of the General Municipal Law. Notwithstanding, the city remained in the action because of the cross claims asserted against it.
. The city’s procedures are almost identical with the corresponding provisions of title 3 of article 11 of the Real Property Tax Law which afford the State’s tax districts with a procedure for the foreclosure of tax liens by an action in rem. Before 1948 New York City employed a lien-sale method of real property tax enforcement which gave the lien assignee a right of foreclosure. (Administrative Code, §§ 415 [11-23.0 — 415 [11-53.3.) This remedy is still available (Administrative Code, § D17-24.0).
. Property owners are given an opportunity, prior to final judgment, to interpose an answer which alleges “a substantial equity over the city’s lien for taxes” and to demand additional time in which to pay the taxes or to have the property sold with the taxes to be paid out of the proceeds of the sale. (Administrative Code, § D17-9.0, subd e, relettered subd d.) Plaintiff took advantage of neither opportunity.