This is an action in replevin to recover certain hotel furniture. No affidavit and bond being filed by plaintiff the property was left in possession of defendants and was sold by them during the pendency of the suit. The facts which control the disposition of the case are as follows:
The property, of the value of $800 was in the possession of defendants at the time of the beginning of this suit. It had belonged to the lessee of a hotel building owned by defendants and by the terms of the lease had been subject to a lien for unpaid rent. The lessee became a bankrupt and was indebted to defendants on account of rent in the sum of $410-. The lessee also was indebted to plaintiff on a promissory note for $1000, the payment of which was secured by a chattel mortgage on the property, but the lien of this mortgage was inferior to defendants’ lien for rent. The property was ordered sold by the bankruptcy court, subject to these two liens, and defendants became the purchasers at that sale and, thereafter, had possession ,of the property and, as stated, were in possession thereof at the time this suit was instituted. A jury was -waived and the court rendered judgment for plaintiff in the sum of $390, the difference between the value .of the property and the amount due defendants for unpaid rent.
*289In buying tbe property at tbe trustee’s sale in bankruptcy, subject to the lien of plaintiff’s mortgage, ■defendants did not assume tbe payment of tbe mortgage debt but became tbe owners of tbe property subject to that incumbrance. Tbe existence of that intervening incumbrance prevented tbe destruction of defendants’ prior lien by merger and we may and, indeed, should regard defendants as being in tbe possession of tbe property under tbe lien the lease gave them for unpaid rent. Their position at tbe time tbe suit was brought was analogous to that of a mortgagee in possession after condition broken and tbe position of plaintiff necessarily must be that of a junor mortgagee attempting to recover possession from such senior mortgagee.
Whether replevin be prosecuted by a plaintiff with ■ or without affidavit and bond, tbe gist of tbe action is the right of tbe plaintiff to immediate possession as against tbe defendant and tbe wrongful detention of tbe property by defendant. [Sutton v. Railroad, 159 Mo. App. 685; Shantz v. Shriner, 167 Mo. App. 635, 150 S. W. 727; Barnes v. Plessner, 137 Mo. App. 571; Cobbey on Replevin, sec. 1049.] A mortgagee in possession after condition broken is entitled to bold possession, not only against tbe mortgagor, but against all junior lien holders. Primarily replevin is an action for possession and without tbe right to immediate possession against tbe defendant, tbe action must fail.
In a long line of decisions beginning with Dilworth v. McKelvy, 30 Mo. 149, the Supreme Court and Courts of Appeals have regarded the action of replevin as one in which the equities of the parties may be adjusted and there special interests in the property ascertained and settled whenever it is practicable to do so. But this view of such actions has not been so far extended as to allow a plaintiff to recover where be bad no cause of action, no right of possession, and *290where the defendant was in lawful possession and,, therefore, innocent of having wrongfully detained the property.
“Replevin lies only for goods wrongfully detained. Indeed, the wrongful detention is the gist of the-action, and if it appears defendant has so much as a special property in the goods supporting a right to immediate possession at the time, the action must fail.” [Sutton v. Railroad, supra, and cases cited.]
It must be borne in mind that this is not a case where the plaintiff filed affidavit and bond and recovered the possession of the property before trial. In such cases where the defendant prevails and has. put a special interest in the property “the judgment should be for the value of the defendant’s interest or for a return of the property until that value is paid, at the option of the defendant.” [Dilworth v. McKelvy, supra; Boutwell v. Warne, 62 Mo. 350.] In the last case cited it is said:
“We are not of opinion that this statute intended, the entire value of the property to be assessed, except where the defendant is the absolute owner., Where the defendant has only a special interest in the property, the jury, or court, should assess the value of that interest. To assess the absolute value in such cases, would lead to manifest injustice. ... It may happen in a suit of this kind, brought by the general owner of property against one who claims a special 'interest in it, that the defendant’s interest in the property expires, o'r is extinguished after the suit is brought and before judgment. In such an event, the Supreme Court of Massachusetts held in one case that the judgment, should be for «costs only. It may happen, again, that, the defendant is bailee .of the property, entitled to its. possession for a limited period, which has not expired when the suit is tried. In such a case the value of the defendant’s interest should be assessed, and the judgment should be for that value, or for the return of the *291property into the defendant’s possession, until his interest ceases. . . . The ¡judgment in each case must he modified by the circumstances, so that the merits of the controversy may be settled in one action. The statute is a general one, designed to meet all the exigencies which the old action of replevin did, and the equity of its provisions will embrace these qualifications of the forms in which judgments should be entered.”
The doctrine thus so well expressed does nothing more than limit the defendant to the recovery of the value of his interest in the property should he elect to take a money recovery. It falls far short of holding that a plaintiff may have affirmative relief against a defendant, who has been allowed to keep the property pending the suit, in an action wherein it should be adjudged that the plaintiff had no right of possession against the defendant and, therefore, no cause of action. It would be a strange doctrine that would make no distinction between a successful and unsuccessful plaintiff but would give to each the same reward and would find the defendant innocent of the charge laid against him in the petition and then adjudge that he must suffer personal judgment to go against him for-his adversary’s pleaded demand.
The court erred in rendering personal judgment for plaintiff and in not sustaining defendants’ demurrer to the evidence. The judgment is reversed.
All concur.