— In an action, inter alia, to recover damages for breach of an agreement to pay the deficiency between the proceeds of a foreclosure sale and a mortgage debt, defendant appeals from a judgment of the Supreme Court, Suffolk County (Geiler, J.), entered July 2, 1982, which, inter alia, is in favor of plaintiff in the principal sum of $466,124.01, after a nonjury trial. Judgment modified, on the law, by reducing the sum thereof to $463,624.01. As so modified, judgment affirmed, with costs, and the matter remitted to the Supreme Court, Suffolk County, for entry of an appropriate amended judgment. Following summary judgment awarded in favor of defendant, this court reinstated the complaint and held that a trial was necessary to determine, among other things, whether the repurchase *715provisions of the agreement of September 12,1977 constituted an independent loan separate and distinct from the mortgage debt (GIT Inds. v Rose, 81 AD2d 656, app dsmd 54 NY2d 752). Based on the evidence introduced at trial, we now conclude that there was in fact an independent loan from plaintiff to defendant, with the mortgage debt pledged as security. Accordingly, plaintiff was not limited to moving for a deficiency judgment pursuant to RPAPL 1371, and was not barred from maintaining this separate action by RPAPL 1301. However, the trial court erred by awarding the sum of $2,500 to plaintiff for legal fees. The agreement of September 12, 1977 expressly limits the amount of legal fees recoverable by plaintiff to those incurred in connection with the foreclosure action brought pursuant thereto. Mollen, P. J., Gulotta, O’Connor and Rubin, JJ., concur.