The plaintiff was a police officer of the city of Boston, acting under a rule regularly passed by the police commissioners, which made it his duty to examine in the night-time *117the doors and windows of dwellings and stores, to see that they were properly secured, and to give notice to the inmates, or, if such buildings were unoccupied, to make fast the doors and windows found open. He crossed the threshold of the elevator entrance of the building, of which the defendants were owners or occupants, the doors of which were open, for the purpose of making an examination, thinking it was the entrance to the upper stories, in order that he might be in from the air and there light his candle, and was precipitated down the well of the elevator, which was unguarded, receiving injury thereby. It is found by the report that he entered with the honest belief “that there might be something wrong being done in the building, and with the honest purpose of arresting offenders, if he found any, or of securing the doors for the safety of the property of the occupants.”
“ It is a very ancient rule of the common law,” says Chief Justice Gray, “ that an entry upon land to save goods which are in jeopardy of being lost or destroyed by water, fire, or other like danger, is not a trespass.” Proctor v. Adams, 113 Mass. 376. As individuals may thus enter upon the land of another, firemen may do so for the protection of property, officers of the law for similar purposes, and, under proper circumstances, for the arrest of offenders or the execution of criminal process. The right to do this may be in limitation of the more general right of property which the owner has, but it is for his protection and that of the public. Metallic Compression Casting Co. v. Fitchburg Railroad, 109 Mass. 277, 280. Hyde Park v. Gray, 120 Mass. 589, 593. Commonwealth v. Tobin, 108 Mass. 426. Commonwealth v. Reynolds, 120 Mass. 190. Barnard v. Bartlett, 10 Cush. 501.
When doors are left open in the night-time under such circumstances that property is unprotected, it is a reasonable police regulation which permits an officer to enter in order to warn the inmates of the house, or to close and fasten the doors, and a license so to do is fairly implied, which, at least, should shield him from being treated as a trespasser.
But, if the plaintiff was a licensee, it is contended that he was no more than this; that, if lawfully upon- the premises, he was there at his own risk; and that none of the defendants were *118under any obligation towards him to keep this entrance or the building in a safe condition. It is certainly well settled that, by the common law, no duty is imposed on the owner or occupant of premises to keep them in a suitable condition for those who come upon them solely for their own convenience or pleasure, and who have not been either expressly invited to enter, or induced to come by the purpose for which the premises are appropriated, or by some preparation or adaptation of the place for use by customers or passengers, which might naturally and reasonably lead them to suppose that they might safely and properly enter thereon. Where no such preparation is made, or express or implied invitation extended, and the entry of the licensee is permissive only, there can ordinarily be no recovery for a neglect properly to guard the premises by which such person may be injured. Sweeny v. Old Colony & Newport Railroad, 10 Allen, 368, 373. Severy v. Nickerson, 120 Mass. 306.
If this be conceded, it is still to be determined in the case at bar whether, when there is evidence which tends to show that the injury proceeded from the neglect of an obligation imposed upon the defendants by statute, the protection intended to be afforded by means of such a statute is not for the benefit of all those who are upon the premises in the performance of lawful duties, even if they are but licensees, as well as for the benefit of those who are there by inducement or invitation, express or implied, and thus whether such neglect may not be made the foundation of an action.
The St. of 1872, c. 260, is entitled, “An act in addition to an act to provide for the regulation and inspection of buildings, the more effectual prevention of fire, and the better preservation of life and property in Boston.” Section 5 is as follows i “ In any store or building in Boston, in which there shall exist or be placed any hoistway, elevator or well-hole, the openings thereof through and upon each floor of the said building shall be provided with and protected by a good and substantial railing, and such good and sufficient trap-doors with which to close the same, as may be directed and approved by the inspector of buildings; and such trap-doors shall be kept closed at all times except when in actual use by the occupant or occupants of the building having the use and control of the same. For any neglect *119or violation of the provisions of this section, a penalty not exceeding one hundred dollars for each and every offence may be imposed upon the owner, lessee or occupant of said building.”
The owner or occupant of land or a building is not liable, at common law, for obstructions, pitfalls, or other dangers there existing, as, in the absence of any inducement or invitation to others to enter, he may use his property as he pleases. But he holds his property “ subject to such reasonable control and regulation of the mode of keeping and use as the Legislature, under the police power vested in them by the Constitution of the Commonwealth, may think necessary for the preventing of injuries to the rights of others and the security of the public health and welfare.” Blair v. Forehand, 100 Mass. 136. When, therefore, in the construction or management of a building, the Legislature sees fit to direct by statute that certain precautions shall be taken, or certain guards against danger provided, his unrestricted use of his property is rightfully controlled, and those who enter in the performance of a lawful duty, and are injured by the neglect of the party responsible, have just ground of action against him. Were the case at bar that of a fireman, who, for the purpose of saving the property in the store, or for the prevention of the spread of fire to other buildings, lawfully entered in the performance of his duties, and who was injured because there were no railing and trap-doors guarding the elevator well, he would have just ground of complaint that the protection which the statute had made it the duty of the owners or occupants to provide had not been afforded him. The act is not to be limited in its operation to the protection of firemen. “ There is no rule,” says Mr. Justice Morton, “ better settled, than that the title of an act does not constitute a part of the act.” Charles River Bridge v. Warren Bridge, 7 Pick. 344, 455. But, if the title were of importance, the object of the act is asserted to be “ the better preservation of life and property,” as well as “ the more effectual prevention of fire.” The case of an officer, who, with lawful process to justify it, enters to make an arrest, or that of one who enters lawfully to protect property, does not differ in principle from that of the fireman which we have considered. Like him, they are within the building in lawful performance of their duty. Even if they *120must encounter the danger arising from neglect of such precautions against obstructions and pitfalls as those invited or induced to enter have a right to expect, they may demand, as against the owners or occupants, that they observe the statute in the construction and management of their building.
The fact that there was a penalty imposed by the statute for neglect of duty in regard to the railing and protection of the elevator well does not exonerate those responsible therefor from such liability. The case of Kirby v. Boylston Market, 14 Gray, 249, cited by one of the defendants, does not decide otherwise. It holds only that an ordinance of the city of Boston, requiring abutters, under a penalty, to clear their sidewalks from snow and ice, still left the remedy, under the St. of 1850, c. 5, § 1, for all damages sustained by an accumulation of snow and ice, exclusively against the inhabitants of the city in their corporate capacity.
As a general rule, where an act is enjoined or forbidden under a statutory penalty, and the failure to do the act enjoined or the doing of the act forbidden has contributed to an injury, the party thus in default is liable therefor to the party injured, notwithstanding he may also be subject to a penalty. Kidder v. Dunstable, 11 Gray, 342. Salisbury v. Herchenroder, 106 Mass. 458. Hyde Park v. Gray, ubi supra.
We have not considered the respective duties of the owners and of the occupants of the building as to the protection of the elevator well. Upon this inquiry, the case is not before us, and the facts are not reported. New trial ordered.