MITCHELL, J.
The complaint is in the ordinary form upon promissory notes executed by defendants to plaintiff. The answer admits the execution of the notes, but alleges that they were secured by several mortgages executed by defendants to plaintiff upon real estate owned by the defendant Bussell R. Dorr; that “thereafter he sold and conveyed the same, and all of the same, to one E. G~. Rogers, who paid the valuable consideration therefor, and that the amount of said notes and mortgages constituted a part and portion of said consideration, and said notes formed and made a part of the purchase price of said premises which said Rogers then and there .agreed to pay to this defendant Russell R. Dorr”; that thereafter, and while Rogers was the owner of the land, the plaintiff entered into a written, contract with him, whereby it was agreed that payment of said notes and mortgages should be extended for a period of three years from the maturity thereof; that these defendants did not consent to such extension; that the value, of the mortgaged premises at the time of the maturity of the notes before such extension was $12,000. The’court ordered judgment in favor of the plaintiff on the pleadings for the amount of the notes, and from this judgment defendants appeal.
Plaintiff’s counsel claim that the proper construction of the answer is that Rogers had paid the full purchase price, including the amount of the mortgages, to defendant Russell R. Dorr. The answer is certainly not a model off clearness, but, taking it as a whole, we think that, at least as against a motion for judgment on the pleadings, it should be construed as meaning that Rogers bought the land subject to the 'mortgages, and that plaintiff granted him the extension with knowledge of that fact. The answer might perhaps admit of the construction that Rogers personally assumed and agreed to pay the mortgages, but we will assume that he merely bought the land subject to them. The quite ingenious argument of plaintiff’s counsel may, we think, be all summed up in the following propositions: (1) That if Rogers did not assume payment of the mortgages, so as to be personally liable, then defendants could not be sureties for him, because there would be no principal; (2) that no agreement between defendants and Rogers, to which plaintiff was not a party, could put Rogers and defendants in the relation of principal and surety towards the plaintiff, so that his granting time to Rogers would re*176lieve defendants; (3) that no contract of extension between plaintiff and Rogers would be binding on defendants unless they were parties to it; (4) that, in any event, Louise B. Dorr was not released by the extension, because it is not alleged that she had any interest in the land, or was a party to the sale to Rogers. In all of these positions we are of opinion that counsel is in error. The reason upon which the rule rests that a binding extension of time given by a creditor to a principal debtor without the consent of a surety releases the latter is that a surety, on paying the debt, has a right of subrogation. But by subrogation he gets only such rights as the creditor actually has; therefore, where the creditor has postponed the debt, the' surety, on paying it, cannot sue the principal until the extension expires; but the surety, by the only contract to which he has ever consented, has a right to pay, and sue the principal at any day after the debt matures. Hence the extension deprives him of this 'right, and from that fact the law conclusively presumes an injury to him, and releases him from liability. This right of subrogation does not depend upon contract,.but is merely a creature of equity, whereby it substitutes the surety in place of the creditor or claimant so as to compel the ultimate payment of the debt or claim by the person or fund that in justice ought to pay it. This right is not limited to those who stand in form as sureties, but extends to all who, though principal debtors as to the creditor, stand as sureties as between themselves and some other debtors, who ought in equity to pay and relieve them. The creditor need not be privy to the contract which creates this relation. Neither is it material when it was created. All that is necessary is that the relation has been created, and that the creditor has notice of it. Of course, no contract to which he was not a party, and to which he has not consented, can change his contract rights against his own debtors; but when he has notice that, as between two of his debtors, or as between his debtor and some third party, the relation of principal and surety for his debt has been created, equity requires that he shall act with due regard to the rights of the surety. The relation of principal and surety is not limited to two persons, but may exist between a person and a fund or between two funds. The application of these principles disposes of this case. When Rogers bought the land subject to the mortgages it became, as to defendants, the primary'fund for the *177payment of the debt; in other words, the relation of principal and surety arose between the land and defendants. If the latter were compelled to pay the debt, they would be entitled to be subrogated to the rights of plaintiff under the mortgages, and sue (foreclose) the principal (the land). But this they could not have done until the extension granted by plaintiff to Rogers had expired. There is nothing in the point that this extension was not binding on defendants because they had not consented to it. The very foundation stone upon which the doctrine rests that an extension granted to the principal debtor releases the surety is that the latter had not consented to it. And under the right of subrogation, which, as we have suggested, is founded not upon contract, but upon equity, the surety merely steps into the shoes of the creditor, and succeeds only to such rights as the creditor actually has. Whittacre v. Fuller, 5 Minn. 401 (508), cited by counsel, involves an entirely different principle, and is not in point. Neither do we see anything in the contention that defendant Louise B. Dorr stands in a different position from that occupied by her codefendant. To whom the land belonged is a matter between themselves. They joined in the mortgages upon it to secure the joint debt of both, and when Rogers bought it subject to these mortgages the land became, as to both defendants, the primary fund for their payment.
The equitable principles applicable to the facts seem to us so plain and so well settled that we do not deem it necessary to cite authorities in their support, unless, perhaps, to refer to Murray v. Marshall, 94 N. Y. 611, which is especially in point. The only thing that we have found in the books at all in conflict with the views we have expressed is a statement in Shepherd v. May, 115 U. S. 505, 6 Sup. Ct. 119, in substance repeated in Keller v. Ashford, 133 U. S. 610, 10 Sup. Ct. 494, to the effect that an agreement of the mortgagor’s grantee (to which the mortgagee is not a party) to pay the mortgage does not put the grantee and the mortgagor in the relation of principal and surety towards the mortgagee, so that the latter, by giving time to the grantee, will discharge the mortgagor. The statement in the first case was wholly unnecessary to the decision, and none of the authorities cited by the court have any tendency to support it. In the second case the statement was pure obiter, and no authority is cited except Shepherd v. May. That the court had not *178fully considered the question is evident from what is said in Union Ins. Co. v. Hanford, 143 U. S. 187, 12 Sup. Ct. 437. What seems to have been uppermost in the mind of the court in those cases was that, according to its holding, a mortgagee cannot sue the grantee of the mortgagor upon the agreement of the latter with the mortgagor (to which the mortgagee was not a party) to pay the mortgage, because there is in such case no privity of contract between the mortgagee and the grantee of the mortgagor. But this, we submit, is wholly foreign to the question, forJthe creditor need not be a party to the contract which creates the relation of principal and surety between his debtors or between his debtor and a third person; neither is the right of subrogation dependent on privity of contract between the creditor and the surety^/ In the present case, had Rogers personally covenanted to pay the mortgages, the extension granted by plaintiff would have wholly released the defendants. If, as we have assumed, he merely bought the land subject to the mortgages, then the extension merely released defendants to the amount of the value of the land.
fn either view, the judgment must be reversed.