This action was brought in the court,below by The Methodist Book Concern, a *214corporation, against Mary B. Corwin, The East End Loan Association Company et ah, to enforce the collection of a judgment, marshal liens and for the sale of real estate, the judgment having been recovered on January 11, 1917, and by force of istatute related back to the first day of the term of court, to-wit, January 2, 1917.
The defendant, The East End Loan Association •Company, filed a second amended answer and cross-petition therein, alleging that on January 9, 1917, it loaned to Mary B. Corwin the sum of $2,000 secured by a mortgage of that date on the property • described in plaintiff’s petition, and further alleging that said money was applied by it at the request and direction of Mary B. Corwin to the payment of .a $1,500 mortgage on the property held by The Southern Ohio Loan & Trust Company, dated February 7, 1913, and a $500 obligation of Mary B. Corwin to Edward B. Quinn, •secured by a conveyance by way of deed of the legal title to said property to said Quinn, dated August 26, 1916, with a lease back containing a privilege of purchase for the sum of $500; that said obligations were paid on said January 9, 1917, •and said property was then and there conveyed by said Quinn to said Mary B. Corwin, who thereupon executed the mortgage to said loan association company. Said company by reason of the fact's so alleged claimed a right to be subrogated to the rights of the lienholders so paid by it, and prayed that it might be so subrogated and declared to have the first and best lien on said property prior and superior to the lien asserted by the plaintiff.
*215To this answer and' cross-petition the -plaintiff demurred on the ground “that it does not state facts sufficient in law to entitle it to priority over plaintiff’s judgment lien.” The court below sustained the demurrer arid entered a judgment in favor of plaintiff, holding that it had a prior and superior lien to the mortgage of The East End Loan Association Company. To which the -said company excepted.
The question presented for the consideration of this court is as to whether or not the fact's alleged, if proven, would entitle the said defendant, The East End Loan Association Company, to be subrogated to the right's of the prior lienholders whose secured claims were so paid by the said company at the request and direction of the mortgagor.
'It will be observed that on January 2, 1917, when it is claimed the plaintiff’s lieri attached to the property, the two liens of The' Southern Ohio Loan '& Trust Corfipany and Edward B. Quinn, aggregating $2,000, were then subsisting liens on the property, so that if The East End Loan Association Company is subrogated to the rights of said two lienholders it will work no injustice to the rights of The Methodist Book Concern, as its security remains the same as when the lien attached and its position will in no way be changed for the worse on account thereof.
The right of subrogation is founded in equity, and will be invoked only when necessary to secure some equitable right and without which an injustice will be done.
In Straman, Admr., v. Rechtine et al., 58 Ohio St., 443, the court say:
*216“Where money is loaned under an agreement that it shall be used in the payment of a lien on real estate, and it is so used, and the agreement is that the one who so loans the money shall have a first mortgage lien on the same lands to secure his money and through some defect in the new mortgage or oversight as to other liens, the money can not be ,made on the last mortgage, the mortgagee has a right to be subrogated to the lien which was paid by the money so by him loaned, when it can be done without placing greater burdens upon the intervening lienholders than they would have borne if the old mortgage had not been released.”
To the same effect are the cases of Amick v. Woodworth et al., 58 Ohio St., 86, and Joyce v. Dauntz, 55 Ohio St., 538.
The court is of the opinion that the facts alleged in said answer and cross-petition, if proven, will entitle The East End Loan Association Company to be subrogated to the rights of the .lienholders so paid by it out of said $2,000, that the allegations contained in said answer and cross-petition are sufficient to state a cause of action for such relief, and that the court below erred in sustaining said demurrer.
“An answer which seeks affirmative relief must be treated as a cross-petition, and if the facts therein set forth entitle the defendant to any relief, the defense thus set up is good as against a general demurrer.” Cincinnati & Columbus Traction Co. v. Jewett Car Co., 11 C. C., N. S., 189.
This court has some doubt as to the right of the court below to entertain and pass upon said demurrer, by reason of the fact that it does not conform to the requirements of the code; however, *217it appears upon inspection of the record that the ¡court below, while sustaining -said demurrer and the defendant having declined to further plead, ■did proceed on final distribution, as though said ■demurrer had not been sustained, to determine the rights of said loan association company, although said company was not in court with any pleading, and ordered it to pay a portion of the costs, and further ordered .paid to it out of the proceeds of the sale the sum of $516.99, on account of its distributive 'share of said' proceeds. The court having found the lien of The Methodist Book Concern to 'be the first lien on the fund so realized, and entitled to be paid before the claim and lien of The East End Loan Association Company, ordered its claim paid in full out of the proceeds of ■said sale; to all of which said company excepted.
By reason of the erroneous action of the court below in sustaining said demurrer and in adjudging and decreeing that the lien of The Methodist Book Concern was 'prior and superior to the-lien of The East End Loan Association Company, and distributing the proceeds of the sale in the manner ■it did, prejudicial to the rights of The East End Loan Association Company, this court therefore orders that the judgment of the court below in sustaining said demurrer, and the finding, judgment and decree of the court in determining and marshaling the liens on said property and distributing the proceeds thereof, be reversed, and that this cause be remanded to the court below for further proceedings according- to law.
Judgment reversed, and cause remanded.
Jones, P. J., and Hamilton, J., concur.