Joab Woodruff, being the owner of real estate, mortgaged the same to James Woodruff. After the execution of the mortgage Joab sold and conveyed the mort*597gaged premises by warranty deed to appellant, Lemuel S. Todd, the latter agreeing and assuming in the deed to pay the mortgage as a part of the consideration. Subsequently Todd sold and conveyed the same premises by warranty deed to Mary Eshelman, the latter assuming and agreeing in the deed to pay off the mortgage as a part of the purchase price. James Woodruff assigned the note and mortgage to John C. Lutz, who instituted foreclosure, making defendants thereto Joab Woodruff, Lemuel Todd, and Mary; Eshelman, and such proceedings were had therein that a decree of foreclosure was given against all the defendants and a personal judgment against Joab Woodruff and Lemuel Todd. No personal judgment was sought or taken against Mrs. Eshelman. The premises were sold by the sheriff under the decree to Lutz, the judgment plaintiff, for $52.99, a sum only sufficient to pay the accrued and sale costs. After the sale, Todd, to avoid execution, paid to Lutz $320, the balance due upon the judgment, and took to himself an assignment of the judgment and decree, duly executed on the margin of the record. Before the year for redemption had expired, Mary Eshelman, for a valuable consideration, as alleged, sold and conveyed the premises to appellee, William Oglebay; the latter at the time of his purchase, having actual, as well as constructive, knowledge that his grantor, Mrs. Eshelman, had assumed as a part of the purchase price the payment of the mortgage, and that she had not paid the same, and that a judgment therefor remained unsatisfied of record. Oglebay timely, and as provided by law, redeemed the premises from the Lutz sale. After the redemption, Todd, claiming the right to resell the property for the unpaid balance of the mortgage debt, procured the clerk, by virtue of Lutz’s assignment to him, to issue to the sheriff an alias copy of the decree of foreclosure, whereupon the sheriff advertised said premises for resale on the foreclosure decree.
*598This action was brought by Oglebay against Todd, Lutz, and the sheriff to enjoin the sale, to- have said judgment and decree declared satisfied, and his title quieted, under the claim that the judgment was paid and the lien discharged. Before trial the sale was made by the sheriff to Todd, and by a supplemental complaint Oglebay asks that the sale be annulled, the judgment and decree declared satisfied, and his title quieted. Lutz filed a disclaimer. Todd’s demurrer to the complaint was overruled. He then pleaded the above facts as an answer to so much of the complaint as sought to quiet the plaintiff’s title against the judgment of foreclosure. He also pleaded the same facts as a cross-complaint, and asked to be subrogated h> the rights of Lutz, the judgment creditor, whose judgment he had been compelled to pay and did pay, as the surety of Mrs. Eshelman, the plaintiff’s grantor; that his said suretyship be determined, and he accorded proper equitable relief. The cross-complaint was stricken out on plaintiff’s motion. Plaintiff’s demurrer to the answer was sustained, and appellant refusing to answer further, judgment was rendered against him for cost, and declaring the Lutz foreclosure judgment and decree satisfied, and appellee’s title quieted against the same.
Three questions are presented for decision: (1) Did the redemption by Oglebay from the Lutz sale expose the property to resale for an unpaid balance of the decree? (2) Did the statute, under the facts shown, after payment by Todd, keep alive the judgment and decree for his use? (3) Are the facts pleaded in the cross-complaint germane to the subject-matter of the action ?
I. Section 782 Bums 1901, provides that whenever any real estate or interest therein sold as aforesaid shall be redeemed by the owner or person claiming under him, the sale thereof by the sheriff shall be wholly vacated as to the real estate so redeemed, and such real estate subjected to sale on execution as if such sale had not been made. This section *599applies to redemptions made by the owner, bis executor, administrator, heirs, or devisees, and to one holding the legal or equitable title under the mortgagor or judgment debtor; and such redemption restores the property, with respect to the lien and incidents of the judgment or decree for any unpaid balance, to the identical status occupied before the first sale. Hervey v. Krost, 116 Ind. 268; Green v. Stobo, 118 Ind. 332; Mitchell v. Ringle, 151 Ind. 16, 68 Am. St. 212; Lemmon v. Osborn, 153 Ind. 172.
Oglebay became the owner by successive conveyances by deed from Woodruff, the mortgagor, and as such owner exercised the right to redeem from the foreclosure sale, and his redemption therefor reestablished the lien and operation of the judgment and decree for any balance that remained unpaid.
II. Section 1228 Burns 1901, provides that when any person, being surety in any undertaking whatever, has been or shall be compelled to pay any judgment or part thereof, or make any payment which is applied upon such judgment by reason of such suretyship, the judgment shall not be discharged by such payment,-but shall remain in full force for the use of the person making- such payment, and, after the plaintiff is paid, so much of the judgment as remains unsatisfied may be prosecuted to execution for his use.
It is well established in this State that a grantee who agrees and assumes to pay off an encumbrance on the land, as a part of the purchase price, thereby becomes to the lien creditor primarily liable for the debt; and, while the grantor will remain equally bound by his obligation, yet, as between him and his grantee, he becomes surety, and his grantee principal debtor. As between the parties to the. deed, the encumbrance becomes the debt of the grantee. Stanton v. Kenrick, 135 Ind. 382; Ellis v. Johnson, 96 Ind. 377; Rodenbarger v. Bramblett, 78 Ind. 213; Campbell v. Patterson, 58 Ind. 66; Josselyn v. Edwards, 57 Ind. 212.
*600It is so manifestly just that a grantee who has made it his paramount duty to pay the debt, and has received and retains the consideration therefor, shall be required to keep his contract, that the doctrine of the above cases is firmly supported by principles of equity, irrespective of the statute. Accordingly, it was held in the case last cited, upon excellent reason, that when a grantor has paid off an encumbrance for which he was bound, and which had been assumed by his grantee, after default of the latter, he became subrogated to the rights of the creditor in the debt and in whatever security existed for its payment, and entitled in equity to whatever judgment against the grantee that the creditor would have been entitled to if the grantor had not paid the debt. See, also, Davis v. Schlemmer, 150 Ind. 472. Applying these principles, and the ease comes to this: When the foreclosure proceedings were had, Mrs. Eshelman 'was the owner of the property, had assumed to pay the encumbrance as part of the consideration, and as between her and Todd, her grantor, she was principal debtor, and Todd her surety. The debt had become hers, and had ceased to be Todd’s debt. When Mrs. Eshelman, after the foreclosure sale and before the year for redemption had expired, conveyed the equity of redemption to Oglebay, the latter took the estate impressed with the mortgage and its incidents in the same way it would have been impressed had it remained the property of his grantor. Therefore, when Oglebay, as owner, redeemed, by virtue of the statute, he restored the lien of the judgment, and reestablished the property to the same relation to the decretal judgment it occupied immediately before the sale redeemed from, for any unpaid part of the judgment. Whatever part of the judgment Todd, as the surety of Mrs. Eshelman, was compelled to pay to the creditor, remained unpaid as to her, and the property was liable to be resold to reimburse him. Todd, however, was not entitled to a sale until he had established his suretyship in some way known to the law. On the face of the record Todd *601appears to be a principal debtor, and hence primarily liable for payment of the judgment. Bayment by him, therefore, amounted at least to a prima facie satisfaction, and an assignment of the judgment to him by Lutz amounted to nothing. If he had paid the judgment as surety for Mrs. Eshelman, as he asserts, he was not entitled, in equity or under the statute, to execution and sale until it had been judicially established that he stood in that relation to the judgment when he paid it. Zimmerman v. Gaumer, 152 Ind. 552, and cases cited. Therefore the sale made on execution issued for his use was a nullity.
III. A person who has paid a judgment for which he was surety to another before the question of his suretyship has been determined may have that relation established by applying, in a proper action, to the court that rendered the original judgment, and become thus entitled to an order for execution for his use. Zimmerman v. Gaumer, supra, and cases cited.
A cross-complaint is not recognized by our practice act, but nevertheless it is the manifest spirit of the code to discourage and abridge lawsuits by granting such liberal procedure as will enable parties to an action to put in issue and litigate all matters of dispute relating to the subject-matter in controversy. This view of the code has uniformly been held by the decisions of this court and finds support in §577 Burns 1901, which provides that the court may “when the justice of the case requires it, determine the ultimate rights of the parties on each side as between themselves.” It may, therefore, he said to he the settled practice in this State, when affirmative relief is due against parties to the suit as to matters germane to the subject-matter of the main action, to permit cross-actions against the plaintiff or among co-defendants. In this case the complaint of appellee, as the same went to final judgment, alleged the payment and discharge of the Lutz judgment and decree, and sought to have the discharge established, and the plaintiff’s title quieted *602against the same. The cross-complaint filed by appellant asserted the non-payment and discharge of the Lntz judgment, his suretyship therein, and payment by him, and sought to have said judgment declared a valid and subsisting lien on the plaintiff’s property, and enforced for appellant’s benefit. Both actions relate to the validity of the lien of the Lutz judgment, and the cross-complaint was clearly germane, and the motion to strike it out should have been overruled. It follows from what has been said that the answer was sufficient against a complaint to quiet title.
Judgment reversed, with instructions to overrule the demurrers to appellants’ first and second paragraphs of amended answer, and to overrule appellees’ motion to strike out appellants’ cross-complaint.