
    City of Salem vs. William Maynes & another.
    Essex.
    November 10. — 28, 1877.
    Morton & Soule, JJ., absent
    The Legislature may, in the exercise of the police power, and for the protection of persons and property against the dangers of fire, authorize cities and towns to restrict or prohibit the erection of wooden buildings within the municipality or any district thereof; and all contracts between individuals are subject to the exercise of this power.
    A city ordinance, passed under the St. of 1872, c. 243, and providing that a wooden building shall not be built within a certain distance of another wooden building, applies to such a building erected after the ordinance took effect, although, before its passage, work was begun on the cellar upon the site of the proposed building, a contract was made for its erection, and' lumber had been bought and prepared m accordance with the contract.
    Bill in equity, filed July 19, 1877, against William Maynes and Henry W. Balcomb, under the St. of 1872, c. 243, for the removal of a wooden building, alleged to have been erected in violation of an ordinance of the city of Salem, passed on April 23, 1877, establishing the limits of a fire district, within which the building was situated, and providing as follows :
    “No person shall erect, or cause to be erected, within said district, any wooden building of more than fifteen feet in height from the foundation thereof (which foundation shall not exceed three feet from the level of the street) to the highest point of the roof, and covering an area of more than one thousand square feet of land; provided, that wooden buildings to be used for the purposes of dwelling-houses, not exceeding a height of forty feet above the grade of the street, and not covering an area of more than two thousand square feet of land, may be erected at a distance not less than eight feet from any other wooden building, measuring from wall to wall; and provided also, that any wooden dwelling-house may be erected at a less distance than eight feet from any other wooden building, by constructing the same with brick walls, either at the sides or ends thereof, as the inspector of buildings shall designate.”
    The case was submitted to this court upon the following facts: On March 19, 1877, the defendant Maynes made a contract in writing with the defendant Balcomb, for the erection of a framed dwelling-house in accordance with certain specifications, by the terms of which Balcomb was to furnish the materials for and erect a portion of the building within eight feet of a wooden building upon adjoining land. The work under the contract was actually begun on March 14, 1877.
    At the time of the passage of the ordinance, the timber and other material for the building had been purchased by Baloomb, the timber cut to dimension, including that for the end of the building in question, and work had been begun upon the cellar.
    On May 15, 1877, before the cellar was completed, and before any portion of the superstructure was erected, the inspector of buildings called the attention of the defendants to the ordinance above named, and informed them that measures would be taken to enforce its provisions, and the defendants informed him of the existence of the contract referred to, and insisted upon theiz right to go on.
    
      .On June 27, 1S77, notices of their violation of the ordinance were served upon the defendants by the inspector of buildings, at which time the sills and the whole or a portion of the floor had been laid on the part of the building in question.
    The western wall of a projection or L of the building, as finished, is twenty-two feet high above the foundation, and fifteen and one half feet wide, and stands at the distance of about eleven inches from the building on adjoining land above referred to, and parallel with the eastern side thereof, and is constructed wholly of wood.
    
      J. A. Gillis, for the plaintiff.
    
      W D. Eorthend, for the defendants.
    
      
       “ Section 1. Cities and towns may, by ordinances and by-laws not repugnant to the laws of the Commonwealth, prescribe rules and regulations for the inspection, materials, construction, alteration and safe use of buildings and structures within their respective limits, not owned or occupied by the United States or the Commonwealth, and excepting bridges, quays and wharves, for the purpose of securing the prevention of fire and the preservation of life; and may prescribe penalties, not exceeding one hundred dollars, for each and every violation of any provision of such ordinances or by-laws.
      “ Sect. 2. Such ordinances and by-laws may be made operative upon and within the whole territory of any city or town, or upon and within any prescribed and defined district or districts of such territory.
      “ Sect. 3. The Supreme Judicial Court, or any justice thereof, in term time or vacation, may, by injunction or other suitable process in equity, restrain any person or corporation from constructing, altering, maintaining or using any building or structure contrary to or in violation of any lawful ordinance or by-law made under or by virtue of this act, and may order and enforce the removal, or abatement as a nuisance, cf any building or structure constructed, altered, maintained or used in violation of such ordinance or by» law.”
    
   Gray, C. J.

There can be no doubt of the right of the Legislature, in the exercise of the police power, and for the protection of persons and property against the dangers of fire, to authorize cities and towns, by ordinances and by-laws, to restrict or prohibit the erection of wooden buildings within the municipality, or within any district thereof. Respublica v. Duquet, 2 Yeates, 493. Wadleigh v. Gilman, 3 Fairf. 403. All contracts between individuals, and even charters granted by the state, are subject to the exercise of this power. Commonwealth v. Intoxicating liquors, 115 Mass. 153. Woodlawn Cemetery v. Everett, 118 Mass. 354. Munn v. Illinois, 94 U. S. 113.

The St. of 1872, c. 243, has conferred on the cities and towns, in this Commonwealth authority to pass such ordinances and bylaws, and on this court jurisdiction in equity to restrain the construction of buildings in violation thereof. The case stated shows that the city of Salem duly passed an ordinance providing that no persons should erect or cause to be erected a wooden building exceeding certain dimensions within a fire district, the boundaries of which were fixed by the same ordinance ; and that the defendants began to erect such a building within those limits after the ordinance took effect. The facts that, before the passage of the ordinance, the defendants had begun work on the cellar upon the site of the proposed building, and had made a contract between themselves for the .erection of the building, and had bought and prepared lumber to carry out that contract, does not exempt them from the operation of the ordinance.

jDecree for the plaintiff.  