§ 1354. Distribution of proceeds of sale. 1. The officer conducting the sale shall pay, out of the proceeds, unless otherwise directed, the expenses of the sale, and pay to the plaintiff, or his attorney, the amount of the debt, interest and costs, or so much as the proceeds will pay and take the receipt of the plaintiff, or his attorney, for the amount so paid, and file the same with his report of sale.
2. The officer conducting the sale shall pay out of the proceeds all taxes, assessments, and water rates which are liens upon the property sold, and redeem the property sold from any sales for unpaid taxes, assessments or water rates which have not apparently become absolute. In any city having a population of three hundred thousand or more or any city having a population between one hundred twenty-five thousand and one hundred seventy-five thousand, such officer shall pay out of the proceeds any liens or incumbrances placed by a city agency upon the real property which have priority over the foreclosed mortgage. The sums necessary to make those payments and redemptions are deemed expenses of the sale. The provisions of this subdivision shall not apply to any judgment in an action wherein any municipal corporation of this state is the plaintiff and the purchaser at the foreclosure sale thereunder.
3. The officer conducting the sale after fully complying with the provisions of subdivisions one and two of this section and if the judgment of sale has so directed shall pay to the holder of any subordinate mortgage or his attorney from the then remaining proceeds the amount then due on such subordinate mortgage, or so much as the then remaining proceeds will pay and take the receipt of the holder, or his attorney for the amount so paid, and file the same with his report of sale.
4. All surplus moneys arising from the sale shall be paid into court by the officer conducting the sale within five days after the same shall be received.