The opinion of the court was delivered by
Valentine, J.:
This was an action brought in the district court of Harper county by J. B. Bullard, as sub-contractor, against William L. Davis, the owner, and David D. Williams, the contractor, on an account for building materials furnished by Bullard to the contractor, and to foreclose a lien for such materials, upon lot 11, block 35, on Jennings avenue, in the city of Anthony, in Plarper county. The materials were furnished by Bullard to Williams, the contractor, during the months of February and March, 1880, and the last item thereof was furnished on March 20, 1880. The statement of the account, with the notice of intention to file a statement for a lien, was filed by Bullard, as sub-contractor, with the clerk of the district court, on May 3,1880; and the final statement for a lien, verified by affidavit, was filed on May 24, 1880. The building was completed about the middle of June, 1880, *235and this action on the account and to foreclose the lien was commenced on May 21, 1881. A trial was had before the court, without a jury, and on the trial the defendant Davis objected to the introduction of any evidence by the plaintiff under his petition, for the reason that the same did not state facts sufficient to constitute a cause of action, which objection was by the court overruled, and the defendant Davis excepted. After the plaintiff had introduced all his evidence, and rested, the defendant Davis demurred to the plaintiff’s evidence, on the ground that the same did not prove facts sufficient to constitute a cause of action, which demurrer was overruled, and the defendant Davis excepted. Whereupon the court rendered judgment in favor of the plaintiff and against the defendant Williams, on the account, and against both the defendants foreclosing the alleged lien upon said lot, and ordering that the lot be sold to satisfy the money judgment. The defendant Davis then moved for a new trial, which motion was overruled by the court, the defendant excepting. The defendant now brings the case to this court.
The defendant Davis, as plaintiff in error, claims that there are substantially three questions to be determined in this case: (1) He claims that the petition of the plaintiff below does not state facts sufficient to constitute a cause of action; (2) that the lien sought to be foreclosed by the plaintiff was filed before the completion of the building, and therefore that it was prematurely filed; (3) that the action brought to foreclose such lien was not brought within the statutory limit of one year from and after the completion of the building.
The grounds upon which the plaintiff in error claims that the petition of the plaintiff below, defendant in error, was and is defective, are as follows: (1) It -fails to state the time of the completion of the building; (2) it fails to state the giving of the notice of the filing of the statement for a lien; (3) it fails to state that his action was brought within the statutory time, or within one year from and after the completion of the building.
Now neither the petition nor the evidence makes out a *236very strong case in favor of the plaintiff below; and indeed the case as made out by the petition and the evidence is so doubtful, so uncertain, and so unsatisfactory, that we think the court below should have granted the defendant below, Davis, a new trial, as prayed for by him. It would seem that the last item of building materials furnished by the plaintiff below to the contractor, Williams, was furnished on March 20, 1880. The statement for the lien was filed on May 24, 1880. The building was not completed either by- the defendant Davis or by the contractor Williams, until about the middle of June, 1880. And this action was not commenced until May 21, 1881. Now the statement for the lien must “be filed within four months after the completion of the building,” (Civil Code, §632,) and not before the completion of the building, as was done in the present case. But if it be said that the sub-contractor’s contract was completed on Márch 20, 1880, when he furnished the last item of materials to the contractor, and that the building should, as to him, be considered as having been completed at that time, then he did not commence this action to foreclose his lien within one year after the completion of the building, as required by § 633 of the civil code. In other words, if we take the view that a building is completed when the contractor completes his contract, or his portion of the building, and not till then, then the present plaintiff, who is a sub-contractor, filed his statement for his lien prematurely; for, in that view of the case, he filed his lien before the building was completed. But if we take the view that the building is to be considered as completed when the sub-contractor has completed his contract, or has furnished the last item of materials which he is to furnish for the building, then the plaintiff below did not commence his action'within one year after the completion of the building. Therefore, take any view of the case, the plaintiff cannot recover.
It is our view, however, that as between the owner of the property and the contractor and sub-contractor, the contractor and the sub-contractor should be considered as substantially one *237and tbe same person with reference to the completion of the building, and therefore that the building should be considered as completed when and only when the contractor has completed his part thereof. No privity of contract exists between the owner of the building and the sub-contractor; but the subcontractor’s rights are based simply and solely upon his contract made with the contractor. The contractor, and not the owner of the building, is the sub-contractor’s debtor, and the sub-contractor has no right to claim that the building has been completed, until the contractor under whom he claims has such right. Under the contract between the owner and the contractor, the owner agrees to pay the contractor a certain sum for constructing the building, and this sum is a fund which may be held under the statutes for the payment, so far as it will go, of all the claims of all the various sub-contractors, for work and materials furnished by them to the contractor, who is the principal and head of all; and all the parties entitled to payment or contribution out of this fund should be able to reach the fund and get their proportionate shares thereof, at the same time, or within the same period of time.
Besides, one sub-contractor ought not to be able to reach this fund and appropriate it to the extent of his claim before another sub-contractor can reach it; for if the fund should not be sufficient to pay the claims of all the sub-contractors? then each sub-contractor should be paid only a proportionate share thereof. .Now the amount of all the claims of all subcontractors eta be ascertained only after all the work and materials have been furnished, and after the building has been completed so far as the contractor is required to complete the same; for the whole of the work may in fact be done by subcontractor's only, or the last item of work performed or materials furnished may be performed or furnished by a subcontractor. The building in such a case would be completed by a sub-contractor; and the sub-contractor completing the building or furnishing the last item of work or material therefor is entitled to his proportionate share of the general fund equally with the sub-contractor, who furnished the first *238item of work or material, or any intermediate portion thereof. Of course when the contractor has furnished, through himself or his sub-contractors, all the work and material which he has agreed to furnish, then the building is completed so far as he is concerned, and is also completed so far as all the subcontractors under him are concerned; and the contractor and each of the sub-contractors may then file their respective statements for liens, and each will then become entitled to his proportionate share of the fund. If, however, the contractor should abandon the work for any cause before completing the building under his contract, it is possible, and even probable, that the sub-contractor may then, if not inequitable, consider the 'building as completed, and obtain liens thereon within four months thereafter by complying with the provisions of §§ 631 and 632 of the civil code. But so long as the contractor has not completed the work under his contract, but is still at work on the building under his contract, the building cannot be considered as having been completed, either as to the contractor or any sub-contractor. Taking this view of the case, the building in the present case was completed, both as to the contractor and the sub-contractor, about the middle of June, 1880, and therefore the sub-contractor’s statement for a lien in the present case was filed prematurely, and therefore the plaintiff who was such sub-contractor, cannot enforce his supposed lien.
The judgment of the court below will be reversed, and the cause remanded for a new trial.
All the Justices concurring.