Hay, bought a piece of land, and to secure the payment of a part of the purchase-money, gave three mortgages of the same date and amount, which were all payable at the same time, and all filed for record at the same instant. Three mortgages were made, because there were three venders of the land, every one of whom chose to have a security, which he could sell at his own pleasure without consulting other persons, and the interest upon which he could collect for himself without being at the trouble of a division with the other two mortgagees. The three mortgages were liens of equal rank in all respects. They were all *449transferred to the Eleventh Ward Savings Bank, the plaintiff in these three actions. Hay sold the land to David 31. Koehler, who assumed and agreed to pay the mortgages; afterwards, Abraham Heller, Abraham Zinn and Solomon Zinn, by an instrument under seal, guaranteed the payment of the principal of the mortgages at maturity, and of the interest as it should from time to time accrue. For non-payment of the principal at maturity, the plaintiff undertook the foreclosure of the three mortgages. It is not at this time worth while to express an opinion as to the propriety of the plaintiff’s course in bringing three different actions of foreclosure when all three mortgages should, according to the settled practice of the court, have been foreclosed in one action. The plaintiff brought three actions and obtained judgment in all. From the three judgments, David 31. Koehler appealed, first to the general term of this court, and afterwards to the court of appeals. Koehler did not give the usual undertaking to stay proceedings pending the appeal, but gave instead, with the plaintiff’s concurrence, three bonds of indemnity, one in each suit, providing for the payment of any deficiency arising upon the sale of the mortgaged premises under the judgments of foreclosure. Ernest Ohl and Henry Eisner were the sureties on all three indemnity bonds. The judgments of foreclosure were all affirmed by the general term of the common pleas and by the court of appeals. The referee appointed to execute the judgments, then proceeded to sel the property. He did not sell under the three judgments at one and the same sale, but assmning that the judgment which the plaintiff had, for convenience, caled Ho 1, .ought to be executed first, he sold the entire property under that judgment for $34,500. He afterwards made another sale of the same property under the judgment caled Ho 2, and thereafter made a third sale under the judgment called Ho. 3. The same person who had bought the property at the first sale, bought at the second and third sales, bidding $250, each time. The entire sum bid at the three ..sales is $35,000. The taxes, assessments and water rates *450due upon the property amount to about $15,000, and must, as well as the cost of the three actions be paid out of the $35,000 before the residue can be paid to the plaintiff It is estimated that there will be a deficiency of $18,000, for which judgment will be entered against Hay, Koehler the Zinn Brothers and Heller. Heller alone comes in and asks that the referee be instructed to divide such of the proceeds of the sales under the three judgments as may be coming to the plaintiff, among the three judgments proportionally. To that objection is made by Ohl and Eisner, the sureties on the indemnity bonds, and by Mr. Koehler. The counsel for Mr. Koehler contends that the court cannot take the money bid at one sale and distribute it as if it had been paid on different sales, and that the only power • the court has is to order a resale in case it be adjudged that the referee did injustice by making a separate sale under each judgment instead of selling under all three judgments at one time. Counsel for Ohl and Eisner contends that the court cannot divide the money among the three judgments without great injustice to the sureties on the indemnity bonds. These sureties it is agreed are bound to pay any deficiency arising under the judgments. There will not be any deficiency at all under judgment Ho. 1, and there will be a comparatively small deficiency under judgment Ho. 2. If the $34,500 bid at the first sale be applied to the payment of the judgments in the order in which the referee proceeded to execute them, for the small deficiency under judgment Ho. 2, and for the large deficiency under judgment Ho. 3, Ohl and Eisner are content to be held responsible. If, however, the money bid at the first sale be ' divided proportionally among the three judgments, there will be a deficiency in each case, and Eisner and Ohl will be compelled to pay all three indemnity bonds. Fortunately for them the amount of each bond is only about $750. Counsel further contended that the court would alter and increase, or rather would be attempting to alter and increase, the liability of the sureties, Ohl and Eisner, if it *451should order the division of the money among the three judgments. I have no doubt of the power of the court to distribute these moneys among the judgments. It is the duty of the court to distribute moneys received at judicial sales, after moneys have been paid into the hands of court’s officers. The court must see that they reach those entitled to them. The court must determine the .priority of liens. If liens be equal in rank, the power of the court to protect that equality is not impaired by any error which a referee may have fallen into in making a sale. The mistake of the referee may or may not require that property should be resold. If fraud, misconduct, surprise or well ground misapprehension has prevented the sale of the property for the price that ought to have been obtained, or if for any other reason it would be inequitable to permit the sale to stand, a resale will be ordered. But, here no one applies for a resale; all parties are content that the sale shall stand, and if justice can be done without a resale, there would be no sense in the court ordering one of its own motion. I find that no one of the mortgages had any priority over the others ; why, then, should the referee be permitted to give precedence to one of the judgments because he finds it marked Ho. 1 ? The court had no power to give that judgment or that mortgage priority; shall the error of a referee effect what the court is powerless to accomplish ? As I have said it is the duty of the court to protect the equality of liens where it exists, and in performing that duty the court will look behind the proceedings of the referee to the transaction out of which the liens arose. These three mortgages being equal liens, equity requires that the money received at the sale should be divided among them propor- ' tionably. The plaintiff does not, however, apply for such a division. It is of no importance to the plaintiff whether this application be granted or not, all the money to be paid will, in any event, go to the plaintiff, and the amount will neither be increased or diminished by ascribing it ratably to the three mortgages. To the petitioner it is a matter of no little *452importance. He is one of the sureties for Koehler, and is bound by the judgments in these actions. On paying Koehler’s debt to the plaintiff, the sureties will become erititled to all the securities for that debt which the plaintiff possesses. The indemnity bonds are a part of' those securities. If the plaintiff would enforce the payment of those bonds the guarantors of Koehler’s mortgage debts will become entitled to enforce them if they pay that debt. The petitioner, like Mr. Hay and the Messieurs Zinn, needs for his protection that the moneys be so divided among the mortgages that he will not be deprived of such security as the indemnity bonds afford. The plaintiff could demand such a division, and the sureties, by right of subrogation, may demand it likewise.
In Story's Equity Jurisprudence (10th edition, sec. 499») it is said: “ Where the principal in a bond had been sued and gave bail and judgment was obtained against the principal and also against the bail by the creditor, and afterwards the sureties on the original bonds (who had counterbonds) were compelled to pay it and then brought their bill in equity to have the benefit of the judgment of the creditor against the bail by having it assigned to them; it was decreed, accordingly; so that although- the bail were themselves but sureties as between themselves and the principal debtor, yet, coming in the room of the principal debtor as to the creditor, it was held that they likewise came in the room of the principal debtor as to the sureties on the original bond. The original sureties had no direct contract or engagement by which the bail were bound to them, but only a claim against the bail, through the medium of the creditor, to all whose rights and the power of enforcing them, they were held to be entitled.”
The case of Bronson, agt. Thomas (2 Jones' Eq., 414) is a strong authority to the same effect (See, also, Barnes agt. Mott, 6 Daly, 150).
It is true that the petitioner has not paid the debt, but he is liable to pay it; and in Adam's Equity (p. 270) it is said: “ The same equity which enables a surety, after payment by *453himself, to recover the amount from-his principal, warrants him to file a bill to compel payment by the principal, when he has been brought under liability by the debt falling due, though he may not have been actually sued.”
Under that principle it seems to me that the petitioner is not prematurely applying for relief. The disposition of the money that Eisner and Uhl desire would embarrass if not entirely thwart him in obtaining the full benefit of subrogation.
I am not unmindful of the fact that Heller alone presents this petition, though Hay and the two Simms have an interest in the matter at least equal to his; but they have all received notice of this application and the granting of it will inure to their advantage. Heller ought not to lose his rights because others do not care to assert theirs.
I see nothing in the objection that the contract of the' sureties on the indemnity bond would be altered, and that gross injustice would be done to them by dividing the moneys proportionally. The contract of those sureties was made with reference to the existing law and practice of the court. If those rules require, as I think they do, the proportional distribution of the moneys, the burden of the sureties is not increased by carrying out the rules. The sureties agreed to pay the deficiency, what that deficiency is the court must determine upon equitable principles and in conformity with its practice.
The application is granted.