SULLIVAN, J.
This action was brought to recover a deficiency alleged to be due after applying the proceeds of a sale of mortgaged chattel property in part payment of the debt secured by such mortgage. Among other facts, the complaint alleges: On April 20, 1895, the defendant, Callaway, being indebted to the plaintiff in the sum of $1,700, executed and delivered to him his promissory note for that sum, and, to secure payment of the same, gave a chattel mortgage upon thirty-three *637sacks of wool. This mortgage contained the following provision: “It is hereby specifically agreed and understood that at any time after the maturity of this note the mortgagee, his attorneys and agents, may take possession and control of said wool, and may at once, without notice, sell and dispose of the same for the highest price obtainable at Mountain Home or other available market, and shall deduct from the proceeds the costs and expenses of said sale, and the balance shall be credited upon the note hereinafter set forth.” It is also alleged that on the first day of July, 1895, acting under the above-quoted power contained in said mortgage, the plaintiff seized the mortgaged property, and thereafter sold the same at private sale for $855.18, which sum was applied in part payment of said note. This action was brought to recover judgment for the balance due thereon. The complaint also asks for a reformation of said promissory note, but no point is made so far as the reformation of the note is concerned. A demurrer was interposed to the complaint, and overruled by the court. The defendant elected to stand on his demurrer. Judgment was entered against him, and this appeal is from the judgment, on the judgment-roll alone.
The only error assigned is the action of the court in overruling the demurrer. It appears from the record that the mortgaged property was taken from the appellant by the respondent and sold by him without either a foreclosure in court, or a foreclosure under the provisions of section 3391 of the Revised Statutes. We are called upon to decide whether the power of sale above quoted from said mortgage could be lawfully exercised by the mortgagee, and, if so exercised, whether he could thereafter recover any balance there may be due on the mortgage debt after applying the proceeds of such sale upon the debt.
As to the first proposition, section 4520 of the Revised Statutes provides, inter alia, as follows: “There can be but one action for the recovery of any debt, or the enforcement of any right secured by mortgage upon real estate or personal property, which action must be in accordance with the provisions of this chapter.” Under the provisions of said section, chattel mortgages can only be foreclosed by an action in court as therein *638provided. But section 3390 et seq. provides for the foreclosure of chattel mortgages by affidavit, notice and sale by the sheriff and also by action in the district court. The above-cited sections must be construed together. Thus two methods are provided by statute for the foreclosure of chattel mortgages. It is clear that the intention of the legislature in the enactment of' said sections was to provide exclusive remedies or proceedings for the foreclosure of mortgages on personal property. It therefore follows that the power of sale contained in said mortgage-could not be lawfully exercised by the mortgagee.
The second point is, The mortgagee having exercised said power, can he thereafter recover any balance that remains due on the mortgage debt after applying the proceeds of the sale, thereon? Under the views above expressed, the sale made by the mortgagee of the mortgaged property was illegal and void, and it now remains as if respondent had brought this action upon the note without first foreclosing his mortgage. As the mortgagee by his own illegal act has deprived himself of his. security, he cannot maintain his action upon the note. (Hibernia Sav. etc. Soc. v. Thornton, 109 Cal. 427, 50 Am. St. Rep. 52, 42 Pac. 447.) This is not a case where the security was destroyed or became valueless without the act or fault of the mortgagee. If it were, a different rule would apply. It is contended by counsel for respondent that it would be a useless and idle act to attempt a foreclosure of said mortgage after the property had been sold by the mortgagee, as bad been already done. While that .contention is true, it is also a well-recognized rule that, where a mortgagee by his own act unlawfully disposes of the mortgaged property, he cannot thereafter maintain a suit upon the debt secured by his mortgage. In this state, as in the state of California, the mortgaged property becomes the primary security, and the personal obligation of the mortgagor a secondary one. The mortgagor under our statutes, is personally liable only after foreclosure, and then only for the balance shown to be due by the return of the sheriff, unless it is made to appear that the property has been destroyed or otherwise become valueless without the fault of the mortgagee. It was said in Biddel v. Brizzolara, 64 Cal. 354, 30 Pac. 609, that “the liability of the *639mortgagor is therefore contingent on the fact that a sale of the mortgaged premises shall fail to satisfy the debt and costs.” While in that case the mortgage was on real estate, the rule is the same as if it had been on personal property, and the sale therein referred to is a legal sale of the property. (See, also, Porter v. Muller, 65 Cal. 512, 4 Pac. 531; Brown v. Willis, 67 Cal. 235, 7 Pac. 682.) A mortgagee cannot waive his security and sue upon the debt. (First Nat. Bank v. Williams, 2 Idaho, 670, 23 Pac. 552; Barbieri v. Ramelli, 84 Cal. 154, 23 Pac. 1086.) It is alleged in the complaint that, under the provision in said chattel mortgage above quoted, the respondent did on or about the first day of July, 1895, take possession of the mortgaged wool, and did on or about the first day of August, 1895, sell and dispose of the same for the highest and best pricé he could obtain therefor, to wit, the sum of $855.18, and on the fifth day of August, 1895, credited said amount on said note. The complaint thus shows that the respondent illegally disposed of said mortgaged property; and, applying the rule that, where the mortgagee has by his own act deprived himself of his security, he cannot maintain his action upon the debt, for that reason the complaint fails to state a cause of action, and the demurrer should have been sustained. Evidently the legislature intended, by the enactment of provisions of law above cited, to protect the debtor from the summary sale of mortgaged property by the creditor, and has provided two methods for the foreclosure of chattel mortgages, and those methods are exclusive. Under the statutes of this state, the mortgagor is only liable for any balance that remains due on the mortgage debt after the foreclosure of the mortgage and sale of the mortgaged property as provided by law, and the application of the proceeds of such sale thereon.
The court erred in overruling said demurrer, and the judgment must be reversed, and the cause remanded, with instructions to the lower court to sustain said demurrer, and it is so ordered. Costs of this appeal are awarded to appellant.
Q.uarles, C. J., concurs.
Stoekslager, J., did not sit in the case, and took no part in the decision.