The opinion of the court was delivered by
Marshall, J.This appeal is from two actions which were commenced in the district court of Chautauqua county to foreclose liens and obtain personal judgments against oil and gas leaseholders for labor performed and materials furnished in developing oil properties. The actions were consolidated in the district court, where some of the defendants filed cross-petitions. Judgments were rendered foreclosing the several liens, and from those judgments the Bolin Oil Company, a copartnership composed of J. R. Bolin, H. K. McLeod, J. E. George, O. M. Wood and E. L. Sharpless, appeals. No personal judgment was rendered against any of the appellants. The trial was without a jury. A demurrer by the appellants *229to the evidence introduced by the lien claimants was overruled and no evidence was introduced by the appellants. The appellants claim that there was no evidence sufficient to justify the judgments establishing the liens and decreeing their foreclosure.
There was evidence which tended to establish the following facts. The Bolin Oil Company had an oil and gas lease, had drilled some oil wells thereon, and was producing oil therefrom. The Bolin Company sold or transferred or turned over the lease to the Buffalo Oil and Gas Company, which, under an arrangement with the former company and with its knowledge, continued the development of the lease. Part of the labor performed for, and part of the materials purchased by the latter company were not paid for. After some time it abandoned the lease, and the Bolin Oil Company reentered and took possession of it. The court found—
“Generally in favor of the defendant and cross-petitioner, Oil Well Supply Company; that they and each of them lawfully furnished materials and labor for the development for oil and gas mining purposes of a certain oil and gas leasehold estate situated in Chautauqua county, Kansas, . . . that they did the work and furnished the materials and supplies respectively set out and claimed for by them in their respective pleadings herein; that all of said material, labor and services were lawfully furnished in developing- said leasehold estate above described and resulted in developing the same for oil and gas mining purposes and that all of said improvements were made and placed upon said premises, . . . that they, W. A. Meadows & Son, The Independent Torpedo Company and Oil Well Supply Company, within due time as reqitired by law, filed mechanics’ lien statements in accordance with law, with the clerk of the district court of Chautauqua county, Kansas, covering their said claims which said liens are set out in the respective pleadings of said parties and that by reason of said lien statements said parties are entitled to a coordinate and first lien upon the whole of the leasehold estate above set out and also upon the buildings and appurtenances thereon used and kept for oil and gas purposes and upon all of the oil and gas wells, fixtures and appliances used in the operating for oil and gas purposes upon said premises.”
1. In Oil Co. v. McEvoy, 75 Kan. 515, 89 Pac. 1048, and Phillips v. Oil Co., 76 Kan. 783, 92 Pac. 1119, decided in 1907, it was held that a mechanics’ lien will not attach to the interest acquired in lands by the lessee under an ordinary oil or gas lease. The rule was referred to in Robinson v. Smalley, 102 Kan. 842, 843, 171 Pac. 1155, and the two former cases *230were cited by way of illustration in White v. Green, 103 Kan. 405, 407, 173 Pac. 974. In 1909, after Oil Co. v. McEvoy and Phillips v. Oil Company had been decided, sections 4996 and 4997 of the General Statutes of 1915 were enacted. Section 4996 reads:
“Any person, corporation or copartnership who shall under contract, express or implied, with the owner of any leasehold for oil and gas purposes, or the owner of any gas pipe-line or oil pipe-line, or with the trustee or agent of such owner, who shall perform labor or furnish material, machinery and oil-well supplies used in the digging, drilling, torpedoing, completing, operating or repairing of any oil or gas well, or who shall furnish any oil-well supplies or perform any labor in constructing or putting together any of the machinery used in drilling, torpedoing, operating, completing or repairing of any gas well, shall have a lien upon the whole of such leasehold or oil pipe-line or gas pipeline, or lease for oil and gas purposes, the building and appurtenances, and upon the material and supplies so furnished, and upon said oil and gas well for which they were furnished, and upon all the other oil .wells, fixtures and appliances used in the operating for oil and gas purposes upon the leasehold for which said material and supplies were furnished and labor performed. Such lien shall be preferred to all other liens or incumbrances which may attach to or upon said leasehold for gas and oil purposes and upon any oil pipe-line or gas pipe-line, or such oil and gas wells and the material and machinery so furnished and the leasehold for oil and gas purposes and the fixtures and appliances thereon subsequent to the commencement of or the-furnishing or putting up of any such machinery or supplies.”
Section 4997 reads:
“Any person, copartnership or corporation who shall furnish such machinery or supplies to a subcontractor under a contractor, or any person who shall perform such labor under a subcontract with a contractor, or who as an artisan or day laborer in the employ of such contractor, and who shall perform any such labor, may obtain a lien upon said leasehold for oil and gas purposes or any gas pipe-line or any oil pipe-line from the same tank and in the same manner and to the same extent as the original contractor for the amount due him for such labor, as provided in section 1 of this act.”
The next section of the statutes provides for a notice of the lien and prescribes the manner of its enforcement, which is the same as in an ordinary mechanics’ lien. It is only fair to say that the appellants do not argue that a lien will not attach to an oil and gas lease.
2. The principal question argued is that the Buffalo Oil and Gas Company was not the owner of the lease at the time that *231the labor was performed and the materials furnished for which liens were claimed, and that therefore no lien will attach. The trial court found generally in favor of the lien claimants, although some specific findings were also made in their favor. Under the general finding, the court must have found the existence of some one of the conditions named in the statute under which a lien could be claimed and filed; either that the Buffalo Company was the owner of the lease, the agent of the owner, or a contractor with the owner. The evidence compelled a finding that one of these situations existed. If the Buffalo Oil and Gas Company purchased the property and became the owner thereof, liens would attach for the labor performed for it and for the material furnished to it in the development or improvement of the property, and anyone that subsequently acquired that property took it subject to the liens. If when the property was turned over to the Buffalo Company, it developed the property for the Bolin Company, the liens would attach because the Buffalo Company would then be acting as the agent of the Bolin Company. If the property was turned over to the Buffalo Oil and Gas Company under a contract by which it was to develop the property for the Bolin Oil Company, the Buffalo Company would be a contractor and those who performed the labor or furnished the material and supplies for the development or improvement of the lease would be entitled to liens therefor. If when the property was turned over to the Buffalo Company, the Bolin Company retained an interest in the property or any right thereafter to occupy or retake it, development made by the Buffalo Company would be made in one of the several capacities described, and the liens would attach. The contract between these companies is not before the court, but the relation between them must come within some one of the situations named. These conclusions are supported by Shearer v. Wilder, 56 Kan. 252, 43 Pac. 224; Potter v. Conley, 83 Kan. 676, 112 Pac. 608; Lumber Co. v. Arnold, 88 Kan. 465, 129 Pac. 178; White v. Kincade, 95 Kan. 466, 148 Pac. 607; Brown v. Walker, 100 Kan. 542, 164 Pac. 1092; id., 101 Kan. 293, 166 Pac. 873; and Automobile Co. v. Dennis, 104 Kan. 241, 178 Pac. 408. The statute under which these liens were claimed is analogous to the mechanics’ l'en statute, and decisions concerning such liens are controlling in the present case.
The judgment is affirmed.