delivered the opinion of the court.
1. It is contended by defendant’s counsel that, if the execution issued on the judgment rendered in the action of Coolidge & McClaine against Smith was enforced against plaintiff’s interest in the real property when it was not subject thereto, his remedy was to apply to the court to set aside the levy, and, having done so and taken no appeal from the denial of the motion, such action became final, thereby precluding the maintenance of this suit, in refusing to dismiss which an error was committed. A text writer, in speaking of a motion to quash a levy upon property under an execution, says: “The court will not, upon the motion of one not a party to the action, undertake to determine the title to the property levied upon. Therefore this is not a proper remedy for one whose property has been levied upon under execution against another, and whose claim is not that there was irregularity in the levy, but only that th e officer has seized the property of a stranger to the writ”: 2 Freeman, Executions (3 ed.), § 271a. Holmes was nota party to the action of Coolidge & McClaine against Smith, in which the execution was issued; and, though there may have been a privity of estate between him and Smith, the motion to quash the levy, which he interposed, presented the question of title to the property, which the court very properly refused to consider. A judicial determination that will bar another suit or action on the same ground must be for relief which either was or could have been demanded and granted in the original proceeding ; and, as the court was powerless to grant the motion, Holmes was not estopped thereby. This principle does not militate against that established in Marks v. Stephens, 38 Or. 65 (63 Pac. 824, 84 Am. St. Rep. 750), that, where an execution is irregularly levied, the remedy of the injured party is to move to set aside the seizure, and, if he *98fails to do so, be is estopped to dispute the regularity of the proceedings; for in that case the party assailing the levy was also a party to the judgment upon which the execution was issued.
2. It is insisted by defendant’s counsel that there is a material variance between the allegations of the complaint and the averments of the reply, and that, having moved to dismiss the suit on that ground, an error was committed in denying the motion. In Mayes v. Stephens, 38 Or. 512 (63 Pac. 760, 64 Pac. 319), in discussing the question here presented, it is said: “The facts relied upon as a ground of action should generally be stated in the complaint; for, if the reply allege matter which constitutes an original cause of action, the averment of the latter pleading will be treated as a departure. * * But a new assignment in the reply, designed to affirm the averments of the complaint by correcting the defendant’s mistake in regard thereto, is not a departure. * * Matter which sustains a pleading is no departure, if set up in the reply, though it might have been set out in the complaint (Fitman, Trial Proc. § 581); the rule being that the complaint and reply, when not repugnant, should be read together to determine the pleader’s intent.” To the same effect see Crown Cycle Co. v. Brown, 39 Or. 285(64 Pac. 451); Patterson v. Patterson, 40 Or. 560 (67 Pac. 664); Kiernan v. Kratz, 42 Or. 474 (69 Pac. 1027, 70 Pac. 506). In our opinion the allegations of new matter in the reply were intended to correct the defendant’s mistake in regard to the aver-ments of the complaint, which are thereby amplified, thus constituting a new assignment, and not a departure. Notwithstanding the averments of the reply and the language of the decree may seem to indicate that this suit is in the nature of a bill to redeem, and hence a departure, we think a careful analysis of plaintiff’s pleadings, construing them in pari materia, will show that the object of the suit is to *99determine an adverse interest in realty, claimed by reason of the levy and sale thereof under execution ; the plaintiff conceding that the sum due from Smith to the defendant on account of the loan, together with the interest thereon and the taxes so paid, constitute a valid lien on the real property in question.
3. It is contended by defendant’s counsel that a suit to determine an adverse interest in real property cannot be maintained by the ownér of the equitable estate against the holder of the legal title, and that, having moved to dismiss the suit on that ground, an error was committed in denying the motion. Our statute authorizes a party claiming an interest or estate in real property, not in the actual possession of another, to maintain a suit against any person claiming an interest or estate therein adverse to him, for the purpose of determining such conflicting claim : B. & C. Comp. § 516. In Ladd v. Mills, 44 Or. 224 (75 Pac. 141), in construing this statute, it was held that any person having a substantial interest in or claim to real property, though not the legal owner thereof, might maintain a suit to determine an adverse claim thereto. In deciding that case, Mr. Justice Bean, referring to the statute in question, said: “Under this provision it is not necessary that the plaintiff have the legal title before he can maintain a suit to determine an adverse claim to real estate.” The decision in that case is controlling in this.
4. These preliminary questions having been disposed of, we come to the merits of the case, which are involved in the inquiry whether or not Smith had such an interest in the real property described in the complaint as could be subjected to sequestration by an execution issued on a judgment in a law action. It is alleged in the answer that he was the owner of this land when it was conveyed to Morley, by deed absolute in form, but which was in fact a mortgage to secure the payment of the sum loaned. This *100averment is denied in the reply, thereby imposing on the defendant the burden of establishing the controverted fact. The evidence unquestionably shows that Smith never held the legal title to the premises, and possessed only the right of obtaining a deed upon the payment of the stipulated sum. He was not, therefore, and never had been, the owner of the real property in question, and had only an equitable interest therein. In Smith v. Ingles, 2 Or. 43, the defendant, being insolvent, purchased certain real property, taking the title thereto in the name of his two minor sons. A judgment having been rendered against Ingles, the real estate in question was levied upon, in pursuance of an execution issued on that judgment, and the premises sold, whereupon it was held that he had no interest in the land to which the lien of the judgment could attach, and that his equitable estate therein could not .be divested by a sale upon an execution while the legal title remained in his sons. In Silver v. Lee, 38 Or. 508 (63 Pac. 882), it was held that where an insolvent debtor purchases land, causing it to be conveyed directly to a trustee, he has no interest therein that is the subject of sale on execution, because he never owned the premises. See, also, the case of Bloomfield v. Humason, 11 Or. 229 (4 Pac. 332).
The rule thus established rests upon the assumption that an equitable interest in real property is an uncertain estate, which, if it could be sold on execution issued on a judgment rendered in a law action, would produce a sum grossly inadequate in proportion to its real value ; for most persons, in purchasing real property, insist upon a certainty of the title thereto, and, where there is a doubt in this respect, usually decline to invest their money. I£> a compulsory sale of such interest upon execution were permissible, there would be little or no competition in bidding. Few people desire to purchase a lawsuit, and the *101judgment creditor would probably secure the equitable estate for a nominal sum. In the interest of the debtor, and to afford purchasers of real property at an enforced sale thereof an equal opportunity with the judgment creditor, the rule adverted to has been adopted, requiring the latter first to establish the fact in a court of equity, in a suit instituted for that purpose, that the debtor’s equitable estate in real property is subject to the payment of his demand, before such interest can be divested by a sale thereof upon execution. So long, therefore, as any substantial thing remains to be done by the debtor before his equitable estate in real property ripens into the legal title, such interest cannot be reached under an execution issued on a judgment in a law action, but to subject such estate to the payment of the creditor’s demand, resort must be had to a court of equity to establish the right. In Pogue v. Simon, 47 Or. 6 (81 Pac. 566), it was held that real property sold upon execution, the sale duly confirmed, and the time for its redemption having expired, though the sheriff’s deed therefor had not been executed, was subject to levy and sale on execution issued on a judgment rendered against the purchaser of the real estate. The decision in that case proceeds upon the theory that, the time for redemption having expired, the purchaser of the real property had nothing substantial to do in order to establish his right, and therefore by operation of law, eo instante on the expiration of the time limited, became the owner of the premises, which rendered the real property subject to seizure and sale on execution, though the deed evidencing the transfer of the title had not been executed. In that case there was nothing that could possibly be done by the original debtor, or those in privity with him, to defeat the right of the prior purchaser under the execution sale, who was entitled to a sheriff’s deed; and for a failure to execute such instrument mandamus would lie.
*102It will be remembered that the consideration paid by Holmes for the equitable interest in the land consisted of an antecedent debt due from Smith. The evidence shows that Holmes knew of the rendition of the Coolidge & Mc-Claine judgment against Smith before he obtained the latter’s quitclaim deed transferring the equitable estate. The defendant had secured an assignment of that judgment, thereby becoming Smith’s creditor to the extent of the sum awarded by the court against him. This judgment was not a lien on the equitable estate in the land (Smith v. Ingles, 2 Or. 43), and the attempt of the plaintiff and of the defendant in this suit to secure the payment of their respective debts was a race between creditors of equal right. If Smith did not have sufficient property or means with which to pay all his debts, he could in good faith prefer a creditor, and sell and convey his property to him in payment of a debt: Elfelt v. Hinch, 5 Or. 255; Sabin v. Columbia Fuel Co., 25 Or. 15 (34 Pac. 692, 42 Am. St. Rep. 756); Currie v. Bowman, 25 Or. 364 (35 Pac. 848). Invoking the maxim that, where there are equal equities, the first in time shall prevail, it follows that Wolfard, by the levy and sale of the real property under execution, secured no interest therein as against Holmes, who theretofore had obtained the equitable estate by a conveyance thereof.
The decree is therefore affirmed, without prejudice, however, to the defendant’s lien on account of his loan, the interest thereon, and the taxes paid by him, together with interest since the payment thereof. Aeeirmed.