(after stating the facts.)
It is admitted by the pleadings in this case that the note and chattel mortgage were executed and delivered by the defendant to the mortgagee for an adequate consideration, *264and it is not denied that the note is entirely unpaid, as alleged in plaintiff’s petition.
It is the general rule that an instrument intended to operate as a chattel mortgage is valid between the parties upon its execution and delivery, although the requirements of statute with reference to acknowledgment and recording are not complied with. 1 Cobbey Chat. Mort., 404. And our statute after pointing out in detail the requirements as to execution, acknowledgment and filing necessary to the validity of such instruments, where the rights of creditors and subsequent purchasers are involved, broadly states: “Provided, that any such mortgage, bond, conveyance, or other instrument intended to operate as a mortgage, shall be valid between the parties, anything contained in this chapter to the contrary notwithstanding, until the debt thereby secured is fully paid. ” Rev. Stat. Wyo., Sec. 2816. The purpose of the statute is to protect the rights of “all creditors and subsequent purchasers and mortgagees in good faith, for valuable consideration and without notice^” dSTo such rights are involved in this case, and upon the pleadings the mortgage was in full force between the parties until the debt secured thereby should be fully paid, the assignee taking all the rights and powers of the mortgagee. The note was overdue, and by the terms of the instrument the plaintiff was entitled to the possession of the property, and replevin was a proper action by which to obtain it. 1 Cobbey on Chattel Mort., 482. The defendant, in his answer, sets up certain alleged equitable defenses, relying for his right to plead such defenses upon Section 3544, Rev. Stats., which provides that “ the defendant may set forth in his answer as many grounds of defense, counterclaim and set off as he has, whether they are such as have been heretofore denominated legal or equitable, or both.” And there is no question that by virtue of this provision the defendant in this, as in any other, action may avail himself of any defense he may have, and will not be required to apply by a separate suit for an injunction or *265other equitable remedy. But there is nothing in the section which creates any new defenses, or makes that a defense which was not heretofore a defense either at law or in equity.
The object of the action of replevin is to determine the right of possession at the commencement of the suit. Cobbey on Replevin, Sec. 25. And any other question, as the ownership of the property, the validity of the mortgage, the maturity or amount of the debt, is relevant and material only as bearing upon that issue. Cobbey on Re-plevin, Sec. 27.
It was competent for the defendant to show that the debt was fully paid, or, otherwise extinguished, at the time the action was commenced, and that the plaintiff therefore had no ownership or interest in the property or right to its possession when he began his suit. Otherwise, the amount of the balance due, or the state of the account between plaintiff and defendant, was not relevant or material in a case like the present where the property had been taken under the writ and turned over to the plaintiff.
But the defendant, while admitting the indebtedness, undertakes by his answer to set up as a defense that the plaintiff sold and disposed of the .property after it was turned over to him under the writ. We know of no system of procedure under which this can be permitted. The issue was the right of possession at the commencement of the suit. What the plaintiff did with the property afterward can in no possible way affect that question. This was not a suit to foreclose the mortgage, but a mere preliminary action to obtain possession of the property. As stated in a Nebraska case: “The action of replevin * * * is a statutory action, every proceeding in which is specially provided for by statute. It cannot be changed into a suit in equity, nor into one for money had and received; neither does offset or counterclaim lie against it.” Blue Valley Bank v. Bane, 20 Neb., 299. By the admissions of the answer the defendant was in default of payment, and the plaintiff was entitled to take posses*266sion of the property in order that he might sell it at public or private sale for the payment of his debt under the power contained in the mortgage.
It was the duty of the plaintiff, upon a sale of the property under the power, after satisfying the amount due, interest and expenses, to pay any surplus that might remain to the defendant; and upon his failure to do so, the defendant had a right of recovery against'him for the amount. It is not charged that there was any such failure, or that there was any surplus, or that the property was sacrificed or wasted by any act of the plaintiff or otherwise. But if there was, or ought to have been, any such surplus unpaid, that fact could not affect the plaintiff’s right of possession at the commencement of the suit.
It is urged that the judgment, so far as it finds the right of possession in the defendant is in accordance with the statute, and, the evidence not being before us, that we ought not to disturb the finding of the court on that question. That if the court exceeded its powers in allowing to the plaintiff the amount of his debt and interest, the plaintiff cannot complain, such allowance being to his advantage and not prejudicial. But the answer admits the execution of the note and mortgage, and that there was an adequate consideration, and makes no claim that the debt has been paid or otherwise extinguished. No legal or equitable defense to the collection of the note or the enforcement of the security is furnished by the answer. In the face of these admissions, it was not competent for the court to render its judgment that the defendant was .entitled to the possession of the property. ' The judgment will be reversed and the case remanded with directions to the District Court to enter judgment in favor of the plaintiff for the possession of the property and costs of suit.
Bemrsed.
PotteR, C. J., and Knight, J., concur.