Harrison, J.
On or about the - day of-, 1889, Milton D. Polk, one of the defendants in this case in the district court, it appears, was the owner of the west twenty feet of lot 12, in block 29, in the city of Plattsmouth, and entered into a contract with William H. Pickens, appellee, for the erection by him for Polk of an addition to a store-room situated on the portion' of the lot above described. On August 30, 1889, Milton D. Polk sold the property and conveyed the title to John F. Polk, who, on May 16, 1891, sold the premises and transferred the title to' one S. O. Lee-son, who was then, and continued to be, a resident of the state of Indiana. July 10, 1889, appellee Pickens filed a lien for the price of material furnished and value of labor performed under the contract, and on the 9th day of July, *2691891, filed his petition in the district court of Cass county, by which he sought to foreclose his lien, naming in such petition as defendants Milton D. Polk and S. O. Leeson, and on the same day he filed the petition, procured a summons to issue, directed to the sheriff of Cass county, which, by its terms, commanded service upon Milton D. Polk and S. O. Leeson. This writ was, the record discloses, returned the date of its issuance, indorsed as follows:
“ State oe Nebraska, 1 Cass County. j ’
“ I hereby accept personal service of the within summons this 9th day of July, 1891, and enter voluntary appearance in said cause. Milton D. Polk.”
September 14, 1891, there was filed in the office of the clerk of the district court an affidavit, the object of which was to procure service by publication upon S. O. Leeson, and upon December 15, 1891, proof of publication was filed, showing that publication of the notice was commenced of date November 20,1891. The defendants appeared and answered, the answer of Leeson containing the following as one of the defenses to the action of appellees and is the only one which need be noticed here, to-wit: “ Further answering, said defendant alleges that more than two years have elapsed since the filing of the pretended lien of plaintiff before the commencing of this action against this defendant and service of process upon him by actual or constructive service, and that as to this pretended lien plaintiff is barred by statute of limitation.” There was a trial to the court, a determination of the issues, and a decree in favor of plaintiff, from which the defendants have appealed.
The main question presented to the court for consideration and determination relates to the validity of the lien, or its being rendered incapable of enforcement against the property because of the length of time which had elapsed or intervened between its filing and the date of the commencement of the action, and this depends upon whether *270the action was commenced against Leeson, the owner of the property and holder of the title when the petition was filed and the summons issued which was not and could not be served on him, or when the first publication of the notice was made upon which the decree foreclosing the lien as to the rights of Leeson was based. The law of this state governing mechanics’ liens and their enforcement provides its own rule limiting the time of the existence of any lien, and within which an action must be instituted for subjecting the property against which it stands as a lien to the payment of the debt or account for which it is security, to two years, and it is conceded in this case that the petition was filed and the summons which was served on Polk was issued before the expiration of two years from the date of the filing of the lien, but that the affidavit for further and indeed all proceedings relating to the service by publication of the notice upon Leeson were all subsequent' to the two years limitation. Section 19 of the Code, in reference to the time when an action shall be commenced, is as follows: “An action shall be deemed commenced, within the meaning of this title, as to the defendant, at the date of the summons which is served on him; where service by publication is proper, the action shall be deemed commenced at the date of the first publication* which publication shall be regularly made;” and a portion of section 17, on the same page of the statutes cited, states: “ The absence from the state, death, or other disability of a non-resident, save the cases mentioned in this section, shall not operate to extend the period within which actions in rem shall be commenced by and against such nonresident or his representatives.” This is an action in rem, and one in which either constructive service or service by summons was proper and sufficient under other provisions of our law governing service in such actions, and service by publication could have been made on Leeson, he being a non-resident of the state, and he was a necessary party *271to the action and the one against whom the action to foreclose must be instituted. (See McCormick v. Lawton, 3 Neb., 480; Phillips, Mechanics’ Liens [3d ed.], sec. 399.) Milton D. Polk was not a necessary party to the action to foreclose. The action, so far as it was one against him, was for judgment upon the account. He had no further interest in the property. (McCormick v. Lawton, supra; Phillips, Mechanics’ Liens [3d ed.], see. 396.) The relief sought as against each of the appellants was entirely distinct and separate, and disconnected from that demanded against the one whom the petition attempted to join with him in the action. The cause could have been dismissed as to either, and proceeded to completion as to the other, and the same relief obtained as to him as in the action as it was prosecuted in which they were attempted to be joined. The remedy as against the one was in no manner or degree dependent for its enforcement upon the enforcement of the remedy against the other, and we are satisfied that the issuance of the summons and its service upon Milton D. Polk was not a commencement of the action to foreclose the lien as against the rights of Leeson, the then owner of the real estate, and the action must be considered as not commenced as to Leeson until the date of the first publication of notice to him, which was too late. The lien had become incapable of enforcement before the affidavit of publication was filed. The fact that he was named in the petition did not make him a party to the action. He did not become a party until served with notice, in this case, nor until* publication of the notice. (Geisecke Boot & Shoe Mfg. Co. v. Seevers, 52 N. W. Rep. [Ia.], 555.) The suit could not be deemed commenced as to- Leeson until he was brought in as a party. (See Green v. Sanford, 34 Neb., 363; Aultman v. Cole, 16 Neb., 4; Burlingim v. Cooper, 36 Neb., 73.) Judgment was rendered in the district court against Milton L>. Polk for the amount of the account. The court had jurisdiction of the *272subject-matter. The case as against Polk was for a judgment on the account, and he had been duly served with summons, or had accepted service, answered, and joined issues. We think the action of the court, by which it retained and tried the controversy between appellee and Milton D. Polk on the account and adjudicated it, was proper and right. Judgment was also rendered against Milton D. Polk for the costs. This, it is contended, should not have been done, for the reason that by the amount involved, and for which the appellee recovered a judgment, it was within the jurisdiction of a justice of the peace and the action on the account should have been commenced in the lower court, and hence the appellee was not entitled to his costs on this branch of the case. This contention is correct and the appellee cannot recover his costs. (Goodman v. Pence, 21 Neb., 459.) The decree of the district court, in so far as it awards a foreclosure of ■ the mechanic’s lien and costs of the action to appellee, is reversed. The action is dismissed as to S. O. Leeson, and, as thus modified, the decree of the district court is affirmed.
Judgment accordingly.