This was a proceeding under the statute relating to-forcible entries and unlawful detainers, brought in the municipal court of the city of St. Paul, for the restitution of two lots of land, alleged to be wrongfully detained from the plaintiff after the expiration of the term of a lease.
The complaint alleges that, on the 15th day of March, 1880, the-plaintiff, by a lease in writing executed by both parties, leased and demised the lots to the defendants for the term of seven months from, the 5th day of November, 1879, at a rental of $700, and that by a provision thereof, the lessor conferred upon the lessees the right and privilege of purchasing the lots at any time prior to the expiration of the term, for the sum of $11,117. It further alleges that the lessees covenanted to pay the rents reserved, and, in case of their default so to do, that the lessor might re-enter, and also covenanted to surrender up to the plaintiff the possession of the premises at the expiration of the term, unless in the mean time they should have-purchased the lots under the provision of the lease in that regard. It alleges that the defendants entered into possession of the lots, under the lease, and that the lease and all its terms, conditions and stipulations were afterwards extended and continued to the 5th day of September, 1880, time to be of the essence of the contract. It further alleges that the defendants did not tender the said sum of $11,117 for the purchase of the premises, and, the term of the lease and extension having expired, demands judgment of restitution.
The answer of the defendants admits the making of the lease, but denies entry under it, or that the defendants ever became the tenants of the plaintiff, and sets up the following special facts: It alleges that the plaintiffs have been in possession of the lots for the-last 25 years as the owners thereof; that in October, 1871, they gave the plaintiff a mortgage upon. the lots to secure the payment of a loan of $10,000 in three years, with interest at 12 per cent, per an*270num; that default having been made, the mortgaged premises were sold on foreclosure by advertisement to the plaintiff, on the 24th day of February, 1877, for the sum of $11,787.04, being the full amount claimed to be due on the mortgage debt; and that a sheriff’s certificate of sale was executed to the purchaser and duly recorded. It further alleges that, while the period of redemption was current, an agreement was made between the parties that the amount for which the property was sold should constitute a new loan, to run beyond the period of redemption, and should draw interest at the rate of 10 per cent, per annum until paid; that the amount of the principal should be reduced by payments during the year 1878 to $8,000, and then the plaintiff should take a new mortgage for that amount; and that in the mean time the original mortgage should stand as security for the new contract, and that the time of redemption, which would otherwise run and expire as to such foreclosure, should not be operative. It further alleges that, in the performance of such agreement, there was paid on the mortgage debt, before such time of redemption expired, the sum of $100, which was received by the plaintiff as part-payment of such mortgage debt, and that afterwards, and at different times between the 24th day of March, 1878, and the 4th day of September, 1880, other payments were made on such debt, and received by the plaintiff as such, amounting in the aggregate to $5,183.13; that $3,000 of that amount was paid on the 5th day of August, 1878, and that an accounting was had between the parties on that day, by which it was found that there was due the plaintiff a balance of $10,371.39; that the interest on this new principal was then computed up to the 5th day of August 1879, at 10 per cent, per annum, and the amount to be due at that date, with certain adjustments-for insurance, taxes, etc., was fixed at $11,500, and the plaintiff then executed and placed in escrow a deed of conveyance to Joanna Bond of the premises, to be delivered upon the payment of that amount by -the time aforesaid, and that the time for such delivery was afterwards extended, but payment was not made, and the deed was returned by the depositary to the plaintiff; that the lease was executed at the request of the plaintiff as further security for the debt remaining unpaid, and for no other purpose, and that the rent stipulated to be *271paid therein was agreed to be part-payment for the mortgage debt, and was actually-paid and received as such, constituting a portion of the above-mentioned payments.
The answer also asserts claims to homestead rights and certain other rights to one of the lots alleged to be owned by Mrs. Bond, arising out of her alleged relation of suretyship with respect to the debt, which, as they are not necessary to be considered in disposing of this appeal, need not be further noticed. The answer prays for affirmative relief, viz., the adjustment and settlement by a decree of the rights of the parties, etc.
The plaintiff interposed a reply, in which he admitted the execution one foreclosure of the mortgage as alleged, but denied the other allegations of the answer. Upon the trial, the plaintiff introduced the lease and agreement extending the same, described in the complaint, and rested. The defendants thereupon moved to certify the case to the district court, and offered to prove by competent testimony the matters set up in the answer, but such motion and offer were overruled, and to such rulings the defendants duly excepted. The plaintiff had judgment for restitution, from which this appeal was taken.
In Fisk v. Stewart, 24 Minn. 97, it was held that “when the real nature of a transaction between the parties is confessedly that of a loan, advanced upon the security of real estate granted to the party making the loan, whatever the form of the instrument of conveyance taken as the security, it is always treated in equity as a mortgage, to which is annexed, as an inseparable incident, the right to the equity of redemption, which can only be extinguished by foreclosure, or voluntary surrender by the party vested with the right by some new agreement founded on an adequate consideration. Neither is it any the less a mortgage that the advance is made wholly upon the security, and without any personal obligation on the part of the borrower to make repayment.” Within the principles thus laid down, we are of opinion that, upon the facts in the answer, the real relation between the parties with respect to the lots in controversy, when this proceeding was commenced, was that of mortgagor and mortgagee. A sale on foreclosure for the full -amount due ordinarily -extinguishes the mortgage debt, and the certificate of sale ordinarily, *272by the running of the period of redemption, ripens into a title; but tkeagreement of the parties made before the period of redemption had expired, and the acts done in performance thereof, had the effect of reviving the debt, or creating a new one, and of turning the certificate of sale into a mortgage, or of preventing its being held except as a security. The lease, therefore, though it may operate as an extension of the debt, cannot be allowed to operate as a basis for a. summary foreclosure. When it was made, the defendants were in the position of mortgagors in possession, and they continued in possession after its execution the same as before, and instead of paying rent to the plaintiff for the use of premises which they were not entitled otherwise to enjoy, they were to make payments, under the name of rents, really to be applied in liquidation of their own indebtedness. These facts control the legal operation of the lease, so as to prevent the plaintiff founding any rights upon it in derogation of the defendants’ right to the equity of redemption.
While these positions do not seem to be strenuously disputed by the counsel for the plaintiff, it is, however, strenuously urged that adefence of this character cannot be availably interposed in a proceeding under the statute by a landlord against a tenant for unlawful detention of property; and this is the real question in the case. The proceedings under chapter 84 of the General Statutes of 1878 are summary and special in their nature, and are governed by the provisions of that chapter, except as otherwise provided by law. Section 87 of chapter 64 of the General Statutes confers upon the municipal court all the power and jurisdiction conferred on justices of the peace-by chapter 84, and provides that the proceedings shall be the same as therein provided, except that no appeal shall be allowed except to the-supreme court; so that the municipal court exercises jurisdiction in such matters to the extent, at least, that it is conferred upon justices, of the peace by that chapter. Section 18 of said chapter 84 provides that “all matters in excuse, justification or avoidance of the allegations in the complaint shall be set up in the answer.” This language-is very broad and comprehensive, and would seem to embrace every character of defence which would defeat the complainant’s right to a restitution. It cannot, however, reasonably be construed to confer-*273upon justices of the peace the power or jurisdiction to try a case where affirmative equitable relief is sought by the answer, and is necessary to the defence, because justices’ courts are not appropriate tribunals for the administration of equity jurisprudence, and the course of proceedings therein is not adapted to administer equitable relief; nor can it be construed to confer power or jurisdiction to try disputed questions of title to real estate, because the constitution expressly withholds the exercise of such power from justices of the peace.
The act concerning forcible entries and unlawful detainers, so far as it affords a remedy for landlords against tenants who unlawfully detain the premises after a default in the payment of the rent, or the expiration of the term, must be construed, as similar acts have always been construed by the courts of other states, to apply only to the conventional relation of landlord and tenant. It was not intended as a substitute for the action of ejectment, nor to afford means of enforcing agreements to surrender possession of real estate, where that relation does not exist or has not existed. The foundation fact upon which the jurisdiction rests is that the tenant is in possession of the land in consequence and by virtue of that relation, and unlawfully withholds possession after a default in the performance of the terms upon which he entered, or after his term has expired. The complaint in this action states a case of that character, and one in which the municipal court has full power to grant restitution. The answer sets up matters which control the legal effect of the lease on which the complaint is founded, and show, if true, that the relation of landlord and tenant was not created by it, and does not exist between the parties. This is a good defence to the action, if established. Johnson v. Chely, 43 Cal. 299; Nightingale v. Barens, 47 Wis. 389; People v. Howlett, 76 N. Y. 574.
It is urged that the tenant is estopped from disputing the landlord’s title until he has first surrendered up the possession; but that principle does not apply to a case like this. The relation of landlord and tenant must exist before any estoppel therefrom can arise. The estoppel does not arise from the lea se, but from the relation established by it, and you cannot make use of the lease to estop the parties from denying the relation, and then make use of the relation to *274estop them from attacking the lease. The grounds usually stated for this doctrine of estoppel are that the tenant has admitted the landlord’s title, and has obtained the possession from the landlord upon his agreement to pay rent, and to restore the possession; therefore, that he ought not to be allowed to set up any claim of right to the land, or to the possession, not derived under the lease, until he has first put the landlord in as good position as he was before the lease, by restoring the possession. The doctrine is not latterly regarded with special favor, and should not be extended to any case to which its reasons do not apply. Schultz v. Elliott, 30 Tenn. 182; Franklin v. Merida, 35 Gal. 558; and cases cited supra. The defendants assert that they did not receive the possession from the plaintiff in consequence of the lease, but had been in possession for many years continuously when the lease was made, and that they did not agree to pay anything for the use of the premises, but that the sums nominally to be paid as rent were to be applied in payment of a previous indebtedness to the lessor, or to reduce a lien held by him on the premises, and generally that the lease was one of a series of transactions by which the lots were designed to be made security for the payment to the plaintiff of a sum of money. The real relation of the parties, therefore, upon the facts sought to be shown in relation to the lease, being that of mortgagor and mortgagee, the plaintiff ought not to be permitted to use the lease for the purpose of establishing the different relation of landlord and tenant, and then summarily ejecting the defendants before their equity of redemption has been foreclosed.
Now, although the matters pleaded in the answer avoid the allegations of the complaint, and, if true, constitute a defence, they are in issue; and the issues in the case seem to involve in effect a question of title to the lots, viz., whether the plaintiff is the legal owner of them, or has merely a mortgage lien on them to secure a sum of money, leaving the equity of redemption in the defendants. I am unable to perceive how the case can be determined upon its merits without trying substantially that question. But the municipal court cannot try a question of title to real estate. Its jurisdiction in this respect is no greater than that of a justice of the peace, and it has *275all the authority, powers and rights of a justice of the peace. Gen. St. 1878, c. 64, § 82; Sp. Laws 1874, c. 1, subc. 3, § 16. Under, such circumstances it has been the practice for the j ustice, when the question of title arose upon the evidence, to certify the case to the district court, under the provisions of Gen. St. 1878, c. 65, § 37, and this practice has been authoritatively established. Ferguson v. Kumler, 25 Minn. 183; Goenen v. Schroeder, 8 Minn. 344 (387;) Merriam v. Baker, 9 Minn. 28 (40.) Section 82, chapter 64, which confers upon the municipal court its general powers, expressly provides for the certification to the district court of cases “where any equitable defence, or ground for equitable relief, of a nature not cognizable before a justice, of the peace, is interposed; or where it appears that the title to real estate is involved.” It is unnecessary to decide whether this provision enlarges the power of that court to certify cases arising under the forcible entry and detainer act, beyond what a justice of the peace would have, for we are of opinion that, by virtue of the provision conferring upon the municipal court all the powers and jurisdiction conferred upon justices of the peace by that act, and of the above-quoted provision of the municipal court act, and under the rule in Kumler v. Ferguson, the municipal court should have heard the evidence offered for the defence, far enough to ascertain that the title to real estate was involved upon the evidence as well as the pleadings, and thereupon granted the defendants’ application to certify the case to the district court. The result is that the judgment must be reversed and a new trial granted. Ordered accordingly.