The common law conferred on certain classes of persons a lien — a right to detain the property of another upon which they had at the owners request expended money or bestowed' labor, until they should be reimbursed therefor. This right was based on natural justice. Continued possession was essential; and when that' was voluntarily surrendered by the lienor, the lien ceased. This right was not extended to all classes. The legislature, however, at an early day supplied it or one analogous to.it, to mechanics and others furnishing labor and materials in the erection of buildings and the construction of vessels, avoiding, however, the impracticability of continued possession on the part of the lienor by substituting therefor an attachment within the time specified.
Laborers engaged in cutting, hauling and driving timber-trees from the land of another, were not numbered among those hav*57ing a common law lien on tbe property upon which they wrought; they could acquire a lien only by special contract therefor. Oakes v. Moore, 24 Maine, 214. But in 1848, the lumbering interests in this state already large, were rapidly increasing. Operations were extending back from the market to the upper waters of the principal rivers and their tributaries. Larger numbers of laborers became necessary. To their arduous labors was largely due the difference between the value of the logs at their place of destination for sale or manufacture, and the sum paid for stumpage. Operators without sufficient means for carrying on their business, commenced putting claims by mortgage or otherwise upon their logs when they began their operations. The result was that when their logs reached the market, their entire value was absorbed by these claims, while the laborers were discharged unpaid. These wrongs had become so flagrant and so frequent as to attract the attention of the legislature; when by “an act giving to laborers on lumber a lien thereon,” it was provided that “any person who shall labor at cutting, hauling or driving logs, masts, spars or other lumber, shall have a lien on all logs and lumber he may aid in cutting, hauling or driving as aforesaid, for the amount stipulated to be paid for his personal services and actually due. And such lien shall take precedence of all other claims except liens reserved by the state of Maine or the commonwealth of Massachusetts for their own use; and the lien shall continue sixty days after the logs, masts, spars or other lumber subject thereto, shall have arrived at their place of destination, &c. Any person having a lien as aforesaid, may secure the same by attachment.” Pub. Laws 1848, c. 72. This provision was incorporated into the revisions of 1857 and 1871, without material alteration except by inserting the word “rafting.” R. S. of 1857, c. 91, § 19. R. S. of 1871, c. 91, § 34.
This statute was enacted to prevent the wrongs which owners had enabled contractors to practice upon laborers. The remedy was based on the ground, as indicated in the title, of considering the labor as having been performed on the credit of the logs regardless of their real ownership. The principle is just to both owner and laborer. To the former who can well -afford to hold his property subject to the lien for what has so materially enhanced *58its value; and to the latter, for having added to the logs, by the consent of the owner, a value equal at least to his claim. He ought to be entitled to retake it when they' come to market, as against those who owned them in their original condition and those holding under them.
By the express language of the statute, the lien takes precedence of all claims except two, “and the statute will not admit of the construction that there is to be a still further exception.” Spofford v. True, 33 Maine, 283.
The statute lien on vessels is analogous to the one before us; and although its language is not so sweeping as this, it gives the laborer’s lien precedence of a prior mortgage. Deering v. Lord, 45 Maine, 293. Perkins v. Pike, 42 Maine, 141. So in Massachusetts, the court in Donnell v. The Starlight, 103 Mass. 227, p. 233, say: “the labor and materials furnished increase the mortgagee’s security and inure to his benefit.” So in the case of The Granite State, 1 Sprague, 278, it is held that a lien for repairs upon a vessel under mortgage and in possession of the mort-gageor is valid and may be enforced after the possession is transferred to the mortgagee pursuant to a decree in admiralty.
Neither does § 36 modify the provisions of § 34 so as to add any further exception to those therein mentioned. The evident design of § 36 is to maintain the attachment notwithstanding the death and insolvency of the employer or debtor, and not to repeal by implication express and positive provisions applicable to some of the liens provided in the chapter. It was only in case of death and insolvency, that a subsequent incumbrance would interfere with a prior attachment in any case. To guard against that contingency alone they are mentioned in this section, and not to introduce any new or different rule when that contingency does not intervene. Our conclusion is that the lien on logs, &c., takes precedence of a prior mortgage.
The lien does not inure to a trespasser, but it comes through a •contract express or implied with some person owning or rightfully possessing the property. Spofford v. True, 33 Maine, 283. Doe v. Monson, 33 Maine, 430. Still it is no part of the contract, .and in no wise affects it, but it is a mode of enforcing payment, *59deriving its validity from positive statute. Hamilton v. Buck, 36 Maine, 536. The action must be brought against the employer who hired the plaintiff and not against the owner when not the employer, and with whom there was no contract.
The fact of several ownership is no obstruction to the lien which attaches to all the logs which the laborer is employed to, and actually does, drive, but not necessarily to them all indiscriminately. For where the owmersof different quantities severally employ sufficient laborers to drive their respective logs, the lien of each laborer is confined to the logs lie is employed to drive notwithstanding all the logs became intermingled in driving and were collectively driven by all the laborers. Doe v. Afonson, 33 Maine, 430. And where they separately employ the same person to drive their respective logs, the laborers’ lien is not upon the whole mass collectively, but it is to be apportioned upon the logs of each owner pro rata. Otherwise one owner might be subjected to pay for labor expended on another’s logs ; and he might be deprived of the statute right of relieving his own property by a “tender of a sum sufficient to pay all that is justly due.” R. S. c. 91, § 37. Hamilton v. Buck, supra. Doyle v. True, 36 Maine, 542.
The plaintiff’s claim for services rendered upon the logs by contract with Woodman is entire and has been rightfully brought as such. But it does not follow that the judgment in rem must be against all the logs jointly. On the contrary it must be apportioned upon the logs of the several owners according to their respective interests. This will do exact justice to all parties as in cases of salvage. Stratton v. Jarvis, 8 Pet. (U. S.) 4.
Those lots of logs respectively bearing the four marks first mentioned in the writ were originally owned by Woodman, and the remainder by ELodgdon. Of the former those designated by the third and fourth marks Woodman had mortgaged to the claimant, Smith, prior to the services sued for in this action, but retained possession as mortgageor. While the mortgageor’s title is good against all except the mortgagee, the latter’s is paramount. Hence the logs attached are severally owned by three persons.
Woodman having been defaulted, the plaintiff will be entitled to judgment against him for $379.05 and interest from the date of *60the writ, and a judgment in remfov that amount as against all the logs, to be apportioned among the several parcels thereof according to the quantity of each owner, which is to be ascertained by the judge at nisi prius, from the scale-bill to be furnished by the parties as per stipulation in the case ; and costs to be apportioned in the same manner. Pub. Laws 1874, c. 191.
Appleton, C. J., Diceerson, Danforth, Peters and Libbey, JJ., concurred.