No claim is made of lack of heat in that part of the premises occupied by the plaintiffs. Whether the occupation of the premises by the plaintiffs, as tenants of the Drake Sanborn Company, and the consent of the defendants to furnish them with heat, presumed from their continuance in performance with knowledge of the change in occupation, gave the plaintiffs any right in the contract so far as it is related to the premises occupied by them, need not therefore be considered. The wrong *Page 529 alleged is the invasion of the plaintiffs' premises and the injury to their goods by water flowing from the sprinkler pipes in the attic of the Drake Sanborn mill. As stated by the plaintiffs' counsel in argument, the complaint is not for "insufficient heat, but because of an excess of water." This legal wrong to the plaintiffs was not dependent upon their occupation of a portion of the Drake Sanborn mill as tenants to the Drake Sanborn mill as tenants to the Drake Company. They would be entitled to protection from such invasion and to recompense for loss so sustained if they were tenants to another, or occupied adjacent real estate under title in fee.
It has been said that in ascertaining the "content of the law," legal duties come before, legal rights (Holmes Com. Law 219); but in the administration of the law there must be found a correlative existence of rights and duties. If there is no wrong without a remedy, there can be no invasion of a legal right for which the law affords a remedy unless there exists at the same time a legal duty upon some one to prevent or abstain from such invasion. The wrong to the plaintiffs being the being the incursion of water upon their premises, the next inquiry in a philosophical search for a remedy is: Upon whom does the law, upon these facts, impose the duty of preventing the invasion by water from which the plaintiffs suffered?
In the attic of the Drake Sanborn mill, for a lawful purpose, — protection against fire, — water was so confined and maintained that there was probability of injury to others if caped. Upon the parties responsible for the collection and maintenance of this water, the law imposes the duty of exercising care prevent its escape. The care and control of the premises upon which the dangerous condition existed having been surrendered by the owners to others, the responsibility for the failure, to exercise such care and control rests with the guilty parties, and not with the owners. Berlin Mills, 58 N.H. 52. In this situation, the only duty of the Drake Sanborn (Company toward the plaintiffs — the only right which the plaintiffs could insist upon against them — was the exercise of care to prevent injury to them. They had no ground of complaint if the building were not heated, any mechanical device the freezing of the water or its escape if frozen could be prevented, or if by due attention and watchfulness the flow of the water from the frozen or broken pipe into their premises could have been stopped before injury was done. Their right to damages for their injury is not dependent upon the fact of lack of care in heating. Any carelessness by which the water escaped upon them to their injury would have sustained their action.
It is suggested that, because the Drake Sanborn Company *Page 530 employed an independent contractor to operate the boilers and to furnish them with heat, they were relieved from all liability for injury to others which might result from failure to supply heat to the building. Carter v. Berlin Mills, 58 N.H. 52, is cited. The argument, however, is based upon a misconception of the "independent contractor" rule, as it is called, and the principle of the case cited. The rule is, that where the liability sought to be enforced is based upon the principle of respondeat superior, if the person for whose negligence recovery is sought is himself an independent contractor, or the employee of one over whom as to the detail of his work the defendant has no control, liability cannot be enforced by invoking that doctrine. But where the duty sought to be enforced is one imposed by- law upon the defendant, he cannot escape liability by showing that he employed another, over whom he had no control, to perform it for him.
"There are certain absolute duties resting upon natural persons and corporations, either by operation of law or by reason of having been voluntarily assumed. The law does not permit a person or corporation to cast off such duty upon an independent contractor so as to exonerate himself or itself for the consequences of its nonperformance. Of this nature is the duty . . . of guarding dangerous substances collected on their property." 1 Thomp. Com. Neg., s. 665; Cabot v. Kingman,166 Mass. 403, 406. A master cannot relieve himself of any non-delegable duty owed by him to his servants by contracting for its performance. Story v. Railroad, 70 N.H. 364, 368; 1 Thomp. (Com. Neg., s. 532. A railroad corporation cannot relieve itself from responsibilities imposed by law as a part of its franchise, by contracting for the exercise of part of its authority by an independent contractor. Rolfe v. Railroad,69 N.H. 476.
"Unquestionably, no one can be made liable for an act or breach of duty, unless it be traceable to himself or his servant or servants in the course of his or their employment. Consequently, if an independent contractor is employed to do a lawful act, and in the course of the work he or his servants commit some casual act of wrong or negligence, the employer is not answerable. . . . That rule is, however, inapplicable to cases in which the act which occasions the injury is one which the contractor was employed to do; nor, by parity of reasoning, to cases in which the contractor is intrusted with the performance of a duty incumbent upon his employer, and neglects its fulfillment, whereby an injury is occasioned." Pickard v. Smith, 10 C. B. N.S. 470, 480.
In Carter v. Berlin Mills, 58 N.H. 52, the damage did not occur because the act which the Thurstons were employed to do was unlawful, nor because of the improper or unlawful construction of *Page 531 the dams. It was due to the improper use of the dams by the Thurstons. As the Berlin Mills had no control over the manner of use of the constructions by the Thurstons — as the Thurstons were not their servants, — they were not liable for their careless acts; and as no other ground of liability except that of respondeat superior was suggested, the plaintiffs failed. See Knowlton v. Holt, 67 N.H. 155; Manchester v. Warren, 67 N.H. 482. The duty imposed upon the Drake Sanborn Company was to exercise care to prevent the incursion of water upon the plaintiffs' property. They are not excused by the fact that they employed others, over whom they retained no control, to exercise this care for them. Because the Drake Sanborn Company are liable, it does not necessarily follow that the defendants are not. But the consideration that the primary duty (the violation of which resulted in the injury complained of) rested upon the Drake Sanborn Company, may be important upon the question which may arise hereafter, whether the plaintiffs' injury was caused by the fault of the defendants.
"Actionable negligence is the neglect of a legal duty. The defendants are not liable unless they owed to the plaintiff a legal duty which they neglected to perform. With purely moral obligations the law does not deal. . . . To bring the case within the category of actionable negligence some wrongful act must be shown, breach of some positive duty." Buch v. Company,69 N.H. 257, 260. The duty must be one owed by the defendants to the plaintiffs in respect to the very matter or act charged as negligence Leavitt v. Shoe Co. 69 N.H. 597; McGill v. Granite Co., 70 N.H. 125. Morrison v. Fibre Co., 70 N.H. 406; Davis v. Railroad, 70 N.H. 519, 520.
It is alleged in the plaintiffs' declaration that it was the duty of defendants to exercise care and prudence the boilers, and to furnish sufficient steam to heat the Drake Sanborn mill and to prevent the freezing of the water in the pipes therein. As the duty, the breach of which constitutes actionable negligence, is one imposed by law, the mere allegation of the duty is insufficient to establish it. The question remains whether upon the facts stated the law imposes the duty. 1 Ch. Pl. 370; Seymour v. Maddox, 16 Q. B. 326; Kennedy v. Morgan, 57 Vt. 46; Marvin Safe Co. v. Ward, 46 N. J. Law 19, 23.
It is alleged that at the time of the injury complained of the defendants were under contract with the Drake Sanborn Company to furnish sufficient steam to heat their mill; but this allegation does not make out a cause of action in favor of these plaintiffs against the present defendants. It discloses a duty on the part of the defendants to heat the building; but this duty was to the Drake Sanborn Company and to no one else. Nothing is *Page 532 better settled than that an action will not lie in favor of any third party for a breach of duty so created Losee v. Clute, 51 N.Y. 494; Necker v. Harvey, 49 Mich. 517; Winterbottom v. Wright, 10 M. W. 109; Longmeid v. Holliday, 6 Exch. 761; Heaven v. Pender, 11 Q. B. Div. 503. The plaintiffs concede in argument that no recovery can be had upon any duty imposed by force of the contract, and that the recovery, if had, must be based upon a duty imposed by law under the circumstances, without, reference to the contract. It is therefore unnecessary to refer in detail to the numerous cases cited by the defendants in support of the propositions, that the rule that no one can Sue upon a contract unless he is a party to it cannot be evaded by bringing what is really an action for a breach of contract in the form of an action for a tort and that "for an injury arising from mere negligence, however gross, there must exist between the party inflicting the injury the one injured some privity, by contract or otherwise, by reason which the former owes some legal duty to the latter." Buckley v. Gray, 110 Cal. 339, 343, — 52 Am. St. Rep. 88, 89; Roddy v. Ward,100 U.S. 195. Without attempting to define the principle by which all these cases were or might have been decided, it may safely be said that in no case has recovery been permitted where the action, though in form for tort, was in substance merely for a breach of the warranty in the contract of the defendant with a third person. Murch v. Railroad, 2 9 N.H. 9, 34: Patterson v. Colebrook, 29 N.H. 94, 102. The action has been deemed maintainable only when the act, complained of could be seen to be a breach of a legal duty owed from the defendant to the person injured, without any reference to the warranties of the contract. The plaintiffs, therefore, cannot recover upon the ground that the defendants failed to do as they agreed with the Drake Sanborn Company.
Although the contract is evidence tending to prove that the defendants were managing the boilers, upon the question of their negligence toward the plaintiffs — their breach of any duty owed by them to the plaintiffs — the engagements which they entered into with the Drake Sanborn Company are entirely immaterial. Styles v. Long Co., (N.J.) 51 Atl. Rep. 710. Whether the maker of a machine which he sells to another is liable to a third person for injuries arising from defects in its construction, is a question raised in numerous Cases. The weight of authority is against any such liability, except "where the thing causing the injury is of a noxious or dangerous kind," or "where the defendant has been found guilty of fraud or deceit in passing off the thing." McCaffrey v. Company, (R.I.) 55 L.R.A. 822. It may be that the principle of these cases would *Page 533 relieve the defendants from direct liability to the plaintiffs, if the ground of action arose upon their engagements to furnish steam for heating purposes to the Drake Sanborn Company, from an independent plant operated themselves. Such facts may present a question of difficulty, but its consideration is not now necessary.
The claim presented by the declaration is not merely for furnishing an insufficient supply of steam, but it is for the negligent and unskillful management of machinery designed to protect all of the occupants of the building from the danger from which the plaintiffs suffered. It is also alleged that the exercise of ordinary care in the management of the boilers would have prevented the injury, and that the defendants were at the time in the sole and exclusive possession of the heating machinery, and were operating it. "The duty to do no wrong is a legal duty. The duty to protect against wrong is, generally speaking and excepting certain intimate relations in the nature of a trust, a moral obligation only, not recognized or enforced by law." Buch v. Company, 69 N.H. 257, 261. The mere possession, therefore, of the means by which harm could be averted from the plaintiffs imposed upon the defendants no legal obligation to protect them. Possession merely of the boiler-house and machinery did not impose upon the defendants any legal obligations to put the heating devices in operation. But the declaration goes farther, and alleges that the defendants were in fact operating the machinery; and the negligence relied upon is the want of skill and care in what the defendants were assuming to do.
Assuming to operate the machinery for the purpose for which it was designed, — to protect all the occupants of the building, including the plaintiffs, — the law imposes upon the defendants, by force of such assumption, the obligation to exercise ordinary care and skill in doing what they attempted to do. Edwards v. Lamb, 69 N.H. 599; Gill v. Middleton,105 Mass. 477, 479; Baird v. Daly, 57 N.Y. 236, 240, 241. This obligation arises, not from the contract, but from the action undertaken. There is a privity, not contract, but of duty. It may be conceded that no liability would attach if the defendants, in violation of their contract, had ceased to manage the boilers. The charge is of negligent management while still in control; the duty violated is the obligation to exercise care so long as they retained control. Upon the facts stated in the declaration, the case is as if the defendants had assumed to hold closed a valve which, closed, prevented the flow of water into the plaintiffs' premises. Knowing that if the water escaped harm would result to others, the duty would rest upon them — at least, toward all for whose protection the device they assumed to operate was designed — to exercise *Page 534 in what they did. They could not carelessly abandon their voluntarily assumed duty.
In the present case, upon the facts alleged the defendants were holding back the water by supplying heat. While under no obligation, so far as the plaintiffs were concerned, to furnish heat or hold back the water, they could not suddenly cease from their self-appointed task without care as to what might happen from such action. If the pipe in the attic froze because no steam was admitted to the steam pipes upon that floor, there would be no liability, because the defendants did not assume to so protect the pipes. As tending to show that the defendants were not in fact operating the heating plant for the protection of the occupants of the building, the contract would be of course material. If they were operating it for the purpose of heating their own building merely, or portions of the Drake Sanborn mill from which no harm came, they are not liable. The defendants, so far as the Drake Sanborn Company were concerned, were the agency employed by them to operate the heating plant common to both mills. Though independent contractors, so that the Drake Sanborn Company were not liable for their casual acts of negligence under the rule of respondeat superior, the ground of the defendants' liability to others is explained upon the analogy of the liability of a servant to third parties.
As a general rule, a servant or agent who has contracted to perform a duty owed by his master or employer is liable only to his employer for his mere failure to perform such duties, and is not liable to third parties. Wilson v. Rich, 5 N.H. 455; Hill v. Caverly, 7 N.H. 215; Denny v. Company, 2. Denio 115; S.C., 5 Denio 639; Murray v. Usher, 117 N.Y. 542, 546, 547; Lane v. Cotton, 12 Mod. 472, 478; 1 Ch. Pl. 75; Sto. Ag., ss. 308, 309; 1 Shearm. Red. Neg., s. 243. The principle is the same as in the cases cited as to the construction of a machine under contract with a third party. The liability cannot arise out of the engagements of the contract, but only from such duty as the law implies from the use and possession of the tools and appliances of the master. So long as the servant does nothing, his contract creates no liability to third person; but the moment he enters upon the work, the obligation of care arises. He cannot create a dangerous situation, and suddenly abandon the work without care for the danger of others. He is bound to the same obligation of care in stopping the machine as in starting it. Osborne v. Morgan, 130 Mass. 102; S.C., 137 Mass.
It is suggested that the failure of the Drake Sanborn Company to maintain an inspection of the building by a watchman was the proximate cause of the injury to the plaintiffs. The plaintiffs *Page 535 cannot recover here unless the fault complained of was the proximate cause of their damage. If ordinary care on the part of the I)rake Sanborn Company, which they were bound to exercise perform their duty to keep the water from the plaintiffs, would have detected the escape of the water and prevented the injury to the plaintiffs, their failure to exercise such care would constitute the proximate cause, not of the bursting of the pipes, but of the injury to the plaintiffs. The facts alleged of the necessity, of heating to prevent injury to the plaintiffs' goods by water negative the suggestion that any negligence except that in the management of the heating plant was legal cause for the injury. If the suggestion is sustained by evidence at the trial, the question will be raised. It is sufficient now to say that the defendants are liable only for damage which was the proximate result of their unskillful management of the heating plant. They are not liable to those as to whose injury their negligence was only a remote cause, if the proximate cause of the injury was the failure of third parties to perform a positive duty owed by them to the plaintiffs.
The defendants' knowledge of the plaintiffs' situation and the character of the probable damage to their property by water may be important upon the question whether the defendants acted with ordinary care under all the circumstances as they knew or ought to have known them. If the plaintiffs consider an amendment of the declaration as suggested advisable, application for leave to make such amendment can be made to the superior court.
Exception overruled.
All concurred.