*171The opinion of the court was delivered by
Valentine, J.:This was an action brought by the plaintiffs in error against the defendants in error, to foreclose "s deed of trust. One of the defendants, to wit, C. M. Kellogg, demurred to the petition on the ground that it did not state facts sufficient to constitute a cause of action, and the court below sustained the demurrer. The plaintiffs below, as plaintiffs in error, now bring the case to this court for review.
The deed of trust appears upon its face to be an absolute conveyance by A. F. Graham and wife to C. M. Kellogg, as trustee, with power to Kellogg to sell the property and pay certain debts owing by the said Graham to the plaintiffs and to other persons who are parties to this action; but the petition alleges that this deed of trust was really given as security for the payment of such debts. Now supposing the allegations of the petition to be true — and upon demurrer we are required to do so — then the deed of trust to Kellogg was in fact a mortgage. Every deed of conveyance in this state, whether absolute or conditional, and whether made to a trustee, or not, if made for the purpose of securing a debt, and for that purpose only, is a mortgage, and can be enforced only by an action in a court of competent jurisdiction. Section 399 of the civil code provides, among other things, as follows:
“ In actions to enforce a mortgage, deed of trust, or other lien or charge, a personal judgment or judgments shall be rendered for the amount or amounts due. . . . No real estate shall be sold for the payment of any money, or the performance of any contract or agreement in writing, in security for which it may have been pledged or assigned, except in pursuance of a judgment of a court of competent jurisdiction ordering such sale.”
In the following cases it is held that a deed absolute upon its face, if given merely for the purpose of securing a debt, is a mortgage: Moore v. Wade, 8 Kas. 381, 387, 388; Glynn v. *172Building Ass'n, 22 id. 746; Bennett v. Wolverton, 24 id. 284. As to deeds of trust, see Lenox v. Reed, 12 id. 227.
Of course where a deed of trust is executed with the understanding between the parties that the title- is to be transferred forever from the grantor to the grantee and his heirs or grantees, then such deed of trust is not a mortgage. But where the deed of trust is executed with the understanding between the parties that it is a mere security for a debt, and that when the debt is paid the title shall be again placed in the grantor, such deed of trust is a mere mortgage. From the allegations in the petition in the present case, we think the deed of trust is a mere mortgage, and that, in order that it shall be enforced, it must be foreclosed in the district court, or some other court of competent jurisdiction.
The judgment of the court below will be reversed, and the cause remanded for further proceedings.
All the Justices concurring.