
    John Johnson v. George W. Keeler et al.
    
    1. Mechanics’ Lien — Enforcement—Parties. In an action to foreclose a mechanics’ lien, all lienholders and encumbrancers should be made parties; and a lienholder who is not made a party in the first instance is entitled, upon application, to come in at any time before final judgment, and, by an answer in the nature of a cross-petition, set forth tils claim of lien, and ask to have the same foreclosed.
    2. -Withdrawal of Suit. In such a case, his right to proceed to a final determination of his lien will not be defeated where the plaintiff’s petition is held upon demuyrer to be insufficient, or where there is a compromise or withdrawal of any claim for a lien by the plaintiff or other lienholder who is a party in the action.
    
      
      Error from Finney Eistrict Court.
    
    The case is stated in the opinion.
    
      H. R. Boyd, for plaintiff in error.
    
      Hopkins & Hoskinson, for defendants in error.
   The opinion of the court was delivered by

Johnston, J.:

Keeler & Hudson contracted to build a house for Benjamin H. Barr, and purchased building material for that purpose of the Western Lumber Company. Failing to pay for the material, the lumber company filed a statement and claimed a lien on the property improved. Thereafter the lumber company brought an action against the contractors and the owner to recover what was due from the contractors and to foreclose their lien. Subsequently John Johnson, who had also furnished material to the contractors for the same building, which had not been paid for, and who had duly filed and claimed a lien, applied to the court to be made a party to the action brought by the lumber company, and to have his lien on and interest in the property determined. This application was heard by the court and granted on May 31, 1888, and Johnson filed an answer in the nature of a cross-bill, setting forth the sale of the material for use in the construction of the house, and that it was so used by the contractors; that there was still due thereon the'sum of $76.50; that a statement for a sub-contractor’s lien had been filed, which was set out at length; and he asked for a judgment against the contractors for the amount due, and that it be declared a prior and paramount lien to that of the lumber company upon the premises of Barr. On June 1, 1888, a demurrer filed by Barr to the petition of the lumber company was sustained by the court, upon the ground that the statement filed by the company for a sub-contractor’s lien was insufficient to authorize a lien against the property of Barr. Proceedings in error were instituted in this court by the lumber company, and the ruling of the district court was re-versed. (Cunningham v. Barr, 45 Kas. 158; same case, 25 Pac. Rep. 583.) After the demurrer of the lumber company was sustained, and on June 18, 1888, the defendants, Barr and Keeler & Hudson, filed separate motions to strike the answer or cross-petition of Johnson from the files, and to dismiss it because the pleading was unwarranted by the code, and the court had no jurisdiction to hear and determine the matters therein stated. These motions were sustained, and Johnson complains of the ruling.

The action of the court in dismissing the cross-petition of Johnson cannot be sustained. He was a proper party in the action, and his pleading set forth a cause of action and right to affirmative relief. He had an interest in the subject of the controversy, and his presence was necessary to a complete determination of the same. The statute relating to the foreclosure of mechanics’ liens expressly provides that all persons whose liens are filed as the statute provides, and all incumbrancers, shall be made parties, and therefore Johnson should have been made a party in the first instance. (Laws of 1871, ch. 97, § 5.) As this was not done, it was proper to grant his application, and permit him to come in and have his claim and lien adjudicated. Indeed, if he had begun an independent proceeding, it would have been proper for the court, under the mechanics’ lien law, to have consolidated the actions and tried them as a single case. The fact that what is termed a “cross-petition” is not expressly authorized by the code, seems to have been relied on as a ground for dismissal. The name of the pleading is unimportant. The defendant may file an answer in the nature of a cross-petition, setting forth a statement of his right to affirmative relief. (Civil Code, § 94.)

“ The answer of the defendant, setting up his claim, is what formerly was a cross-petition in name, and in effect is still the same, although called an answer. The reply his co-defendants may make to it is in legal effect an answer, although called by a different name. And all this is within the spirit of the code, and a mere difference about names ought not to operate to defeat it.” (Kimball v. Connor, 3 Kas. 414. See, also, Town Co. v. Morris, 39 id. 377; Civil Code, §§ 36, 41, 42.)

Neither did the action of the court in sustaining Barr’s demurrer to the petition of the lumber company work a discontinuance of the action, nor warrant the dismissal of Johnson’s cross-petition. In the first place, as has been seen, that was an erroneous decision; but if it had been correctly decided, and there had been a voluntary withdrawal of the claim of lien by the lumber company, it would not have prejudiced the right of Johnson to proceed with the foreclosure of his lien. After he came in and filed his pleading, the other parties were bound to take notice of his claim and of every subsequent step taken in the action. He is properly before the court, asking affirmative relief, and the compromise, settle-, ment or withdrawal of a claim by another lienholder or incumbrancer, who is a party to the action, should not and will not defeat him in proceeding with the action to a final determination of the matters involved. (Venable v. Dutch, 37 Kas. 515; Worrell v. Wade’s Heirs, 17 Iowa, 96; King v. Thorp, 21 id. 67.)

The judgment of the district court will be reversed, and the cause remanded for a new trial.

All the Justices concurring.  