The Yew Jersey Midland Railway Company is an insolvent corporation. Its effects are in the hands of receivers,, appointed by this court by two orders; one in a suit in insolvency and the other in a suit for foreclosure of the first mortgage on its property. Fn the- last mentioned suit, Cornelius-A. TVortendyke has filed a:petition in behalf of himself and, certain others, who,, with him,, before- the- proceedings ini insolvency, advanced money upon contracts which, the- company had made with certain vendors of locomotive- engines and railroad cars- These advanees were made to enable the company to meet its- engagements to pay installments-of money on account of rent,. or,, as- it may more' accurately be- termed,, purchase money of engines- and. cars delivered to it by those-vendors as upon, lease,, but on agreement thatom the payment *112•of the rent in full, according to the contract, the company should become the owner of the demised rolling stock. The agreement provided, also, for the re-taking of the property by the lessors into their possession, in default of payment of rent. There was, therefore, a consequent liability to loss by the company, in case of inability to meet its engagements. The petitioner and all the others, except four, in whose behalf he appears, were guarantors of the company on the contracts, and all those by whom the payments were made, were, at the time of making them, directors of the company. The complainant claims that the rolling stock is covered by his mortgage. The petitioner prays to be subrogated to the rights of the lessors for the payments. All parties in interest have had notice of this application. The complainant’s counsel took jDart in the examination of the witnesses in support of the petition, and on the hearing of the order to show cause granted on the petition, opposed the granting of the relief prayed for. Their opposition was, however, solely upon the merits, no objection being made to the form of the proceedings, but, on the contrary, they expressed a willingness that the matter should be disposed of on the petition and testimony.
The payments in respect of which subrogation is sought, Avere made under circumstances which entitle those by Avhom they were made to substitution. Some of those persons were sureties for the payment of that money, and, irrespective of suretyship, the money was paid by all of them at the request •of the company, and on the understanding that they AArould be subrogated to the rights of the lessors in respect thereto. It is proved that these payments AArere made in pursuance and in partial execution of an arrangement by which, for the relief •of the company, it had been agreed that a rolling stock company should be formed by the persons Avho made the payments, and that the rolling stock company should take, by assignment, the contracts of the railroad company for the rolling stock which the latter held under lease, and provide the means for paying the rent. The railroad company, under this arrangement, was to become the lessee or vendee of the *113rolling stock company, in respect to the engines and cars, on more favorable terms than those of the contracts, and so would have relief from the stringent terms imposed by the contracts, and with which, in its then embarrassed condition, it was •unable to comply, and a non-compliance with which, threatened •such serious consequences. At the time when these payments were made, it was understood between the railroad company and those who made them, that they were made on account of the rolling stock company, which had been incorporated, but ■had not yet been formally organized, although it appears to ■have had a temporary organization. Again, those who made these payments were directors of the railroad company. As such, they vrere in the position of trustees, and they are, therefore, apart from other considerations in favor of substitution, entitled to re-imbursement out of the trust property for advances made by them to save that property. It would manifestly be gross injustice to give to the mortgagees or other creditors of the railroad company, the benefit of those advances at the expense of those by whom they were made. It was argued by the complainant’s counsel, that the payments under consideration must be regarded as voluntary, and that, therefore, no -right of subrogation can be gained by means of them. The guarantors were in no sense volunteers; and as to the others, these payments were indeed made to relieve the railroad company and were made directly to it, but they were, nevertheless, made on an understanding that those by whom they were made, were to have security for their re-payment by .subrogation, through the arrangement by which the rolling stock company was to have an assignment of the contracts. In Paine v. Hathaway, 3 Verm. 212, it was held that if a person who has agreed with a debtor to advance the money (to be secured by mortgage on land) to discharge a debt which is secured by encumbrance on that land, himself pays the debt with the money and discharges the encumbrance, he is not to be regarded as a volunteer. After such an agreement with the debtor, he will not be considered a stranger with regard to the debt he has paid, but in equity may be entitled to the *114benefit of the security which he has satisfied with the expectation of receiving a new mortgage or lien on the land for the money paid.
In view of the resolutions of the board of directors of the railroad company on the subject, and of the testimony generally, none of the payments in question can be held to have been merely voluntary and made solely on the faith of the credit of the railroad company. As to the guarantors, their claim to subrogation does not depend on request or agreement. Equity will, as a matter of course, and without any agreement to that effect, substitute in the place of the creditor a person who advances money to pay the debt for which he is-bound as surety.
But it is urged that no subrogation can take place here, because the whole debt has not yet been paid, and because, since the payments in question, there have been other payments made under the same contracts, on account of- the same rolling stock, by the receivers! The subrogation decreed will be subject to the rights of the lessors, to which it will accordingly be postponed. The right to it is superior to any claim of the receivers upon the property in respect to payments-made by them, for they represent the railroad company or its mortgagees of the property.