
395 Mass. 608 (1985)
481 N.E.2d 466
JAMES A. RIBEIRO & another, administrators,[1]
vs.
TOWN OF GRANBY.
Supreme Judicial Court of Massachusetts, Hampshire.
April 1, 1985.
August 8, 1985.
Present: HENNESSEY, C.J., LIACOS, ABRAMS, NOLAN, & LYNCH, JJ.
Cornelius J. Moriarty, II, for the plaintiffs.
Raymond R. Randall, Town Counsel, for the defendant.
HENNESSEY, C.J.
This is an action under G.L.c. 258, § 1 (1984 ed.), the Massachusetts Tort Claims Act, in which the plaintiffs, coadministrators of the estate of James A. Ribeiro, Jr., seek damages from the town of Granby (the town) for the death of their son in an apartment fire in January of 1983. The plaintiffs allege negligence on the part of a building inspector of the town, as well as members of the towns's board of health, for their failure to require installation of a second means of egress from the decedent's apartment. The plaintiffs seek damages from the town for the wrongful death and for the conscious pain and suffering of the decedent.
*609 A judge of the Superior Court allowed the town's motion to dismiss the complaint for failure to state a claim on which relief can be granted. Mass. R. Civ. P. 12 (b) (6), 365 Mass. 754 (1974). The plaintiffs appealed, and we ordered the matter to be transferred to this court. We affirm.
We summarize the facts as alleged in the plaintiffs' complaint.[2] Mary E. and Robert R. Niquette bought a house in Granby in January of 1962. At some point thereafter they began leasing apartments in the house to tenants. In November of 1974, the Granby board of health received a complaint that raw sewage was leaking from the septic system servicing the Niquettes' house. The record does not reflect whether any remedial action was taken. Further problems with the septic system arose periodically between the years 1978 and 1980. Several inspections occasioned by the septic problem, and by hazardous road conditions caused by freezing effluent, were conducted by the board of health in 1980, and letters were issued ordering Robert Niquette to correct the problem. A further inspection of the premises by the three members of the board of health was conducted on January 12, 1981, and resulted in the board's advising Robert Niquette that the two apartments at the premises were condemned as unfit for human habitation, and that both apartments should be kept vacant until the septic system was repaired. On April 14, 1981, a letter signed by the members of the board of health again advised Robert Niquette of the health code violations attributable to the uncorrected septic problem. It cited his inattention to the problem, stated that the premises were condemned and would be placarded, see 105 Code Mass. Regs. § 410.950 (1983), and notified him of his right to appeal.
Also on April 14, 1981, the building inspector of the town sent a letter which notified Robert Niquette that the building inspector had conducted an inspection of the exterior of the premises on April 9, 1981, and that the premises were in violation *610 of several provisions of the State Building Code, 780 Code Mass. Regs. (1980). Section 2203.7 of the building code provides that "[a]ny existing building shall provide at least two (2) means of egress serving every story which are acceptable to the building official." The letter noted that it appeared the second story rear exit was either never constructed or was destroyed and never replaced. The letter specified what kind of egress would be acceptable to serve the two second story apartments and ordered that the work be done within ten days.
By letters, each dated May 21, 1981, and sent by certified mail, the building inspector specifically notified each of the second-story tenants (a Mr. Therrien and a Ms. Patridge) of the lack of two independent means of egress from the second floor. The letters stated that the fire department had also been informed of the problem. The letters included the following statement: "I cannot express the hazards adequately enough that only one exitway encompasses. Please inform all members of your family and person(s) that visit your home that you have only one exitway."
On December 21, 1981, Robert Niquette attended a Granby board of health meeting. During that meeting he informed the board members that he had two new single tenants (one of whom was the deceased, James Ribeiro, Jr.), and that because of decreased water usage the sewage problem was alleviated. He also informed the board that he had located someone to build a second means of egress as soon as the weather improved.
According to the complaint, a second means of egress from the second story apartments was never built. Neither the board of health nor the building inspector ever took action to compel compliance with the building code requirements. On January 1, 1983, roughly one year after Niquette had assured the board that a second means of egress would be constructed, a fire ensued at the Niquette premises. James Ribeiro, Jr., perished in his second floor apartment as a result of smoke inhalation and asphyxiation. The complaint alleges that the negligence of the building inspector and the members of the Granby board of health in failing to compel correction of the State building code and sanitary code violations, and the resultant lack of a *611 second means of egress from the second story of the Niquette premises, were proximate causes of Ribeiro's death.
The arguments of the parties rightly concentrate in large part on Dinsky v. Framingham, 386 Mass. 801 (1982), and Irwin v. Ware, 392 Mass. 745 (1984). In Dinsky, supra at 804, we recognized "the basic principle that the abrogation of the doctrine of governmental immunity by the Act [G.L.c. 258] simply removed the defense of immunity in certain tort actions against ... municipalities.... It did not create any new theory of liability for a municipality." We held in that case that "in the absence of a special duty owed to the plaintiffs, different from that owed to the public at large," id at 810, the municipality would not be liable for the negligent issuance of building and occupancy permits. We concluded that there was no special duty owed to the plaintiff homeowners in the case, on the ground that there was no intention in the statutes or the State building code to create private causes of action on behalf of purchasers of premises which were developed in violation of governmental requirements. Id. at 809. See Nolan v. Parker, 15 Mass. App. Ct. 475, 478 (1983).
Most recently, in Irwin v. Ware, supra at 754-756, we considered whether Dinsky applies to the negligent failure of police to exercise their statutory powers over intoxicated persons operating motor vehicles. Unlike the relevant legislation in Dinsky, the statutes at issue in Ware evidenced "a legislative intent to protect both intoxicated persons and other users of the highway." Id. at 762. Moreover, in Ware we concluded that "the risk created by the negligence of [the] municipal employee [was] of immediate and foreseeable physical injury to persons who [could not] reasonably protect themselves from it." Id. at 756. Consequently we found a special relationship between "a police officer who negligently fails to remove an intoxicated motorist from the highway, and a member of the public who suffers injury as a result of that failure." Id. at 762.
The defendant has argued that this is an "inspection case," like Dinsky and unlike Ware, and that therefore there is no special relationship between the municipality and the decedent. We agree with the plaintiffs that merely because this case can *612 fairly be called an "inspection" case is not necessarily determinative of the issues before us. The plaintiffs contend that injury and death followed from the failure of public authorities to take affirmative action after discovering the danger in pursuit of their statutory duties. Thus the plaintiffs argue that Ware is controlling because, as in that case, the risk posed by the officials' failure to act was foreseeable. We do not agree that Ware extends this far.
It can be argued that the applicable statutes, G.L.c. 143, §§ 3, 3A, 6, 8, 9 (1984 ed.), and the State building code,[3] 780 Code Mass. Regs. §§ 123, 124 (1980), contain language which, like the relevant legislation in Ware, indicates that the Legislature intended to protect individual members of the public.[4] Nevertheless, we recognize that, unlike Ware, the case before us, while tragic, presents a "relatively leisurely course of events." Ware, supra at 756. The danger was discernible for many months before the harm occurred. More than a year ensued between the building inspector's warning letter and the fatal fire. During this time the owners of the premises, and indeed the occupants themselves, could have taken measures to rectify or avoid the danger. In Ware, "the threat ... (intoxicated driving) [was] immediate; ... the threat [was] short-lived, ... and the plaintiffs (the motoring public) had no chance to protect themselves." Id.
*613 Thus, we conclude that the duty owed by the building inspector was to the public at large and no special duty was owed to the decedent. "To hold otherwise would cause a municipality to become substantially an insurer of each and every construction project. The tremendous exposure to liability that could result from such a decision would likely dissuade municipalities from enacting regulations designed for the protection and welfare of the public." Dinsky, supra at 810. Good policy also strongly indicates that the liability, if any, on the facts shown here must be left only on the owners of the property. As this court has on a prior occasion taken notice, public agencies lack "the resources necessary to police the entire housing sector." See Boston Hous. Auth. v. Hemingway, 363 Mass. 184, 192 (1973).
Considerations of sound policy, as well as legislative intent, lead us to conclude the judge was correct in ordering the dismissal of the plaintiffs' complaint.
Judgment affirmed.
NOTES
[1]  Linda L. Ribeiro.
[2]  The complaint is written in such complete detail that it is apparent that the legal sufficiency of the plaintiffs' case may be tested as completely under rule 12 (b) (6) as under a summary judgment proceeding.
[3]  Although the board of health also found that the Niquettes' building violated the State sanitary code, 105 Code Mass. Regs. § 410 (1983), and G.L.c. 111, § 127A, these violations concerned septic problems, and were unrelated to the decedent's death. Therefore, under these circumstances, no issue was presented as to whether the sanitary code created any special relationship between the board of health and the decedent which would give rise to a private cause of action.
[4]  General Laws c. 143, §§ 6 and 9 (1984 ed.), provide some support for the argument that the Legislature intended to create a special relationship in the circumstances here. According to § 6, "[t]he local inspector, immediately upon being informed by report or otherwise that a building or other structure or anything attached thereto or connected therewith in that city or town is dangerous to life or limb or that any building in that city or town is unused, uninhabited or abandoned, and open to the weather, shall inspect the same; and he shall forthwith in writing notify the owner, lessee or mortgagee in possession to remove it or make it safe if it appears to him to be dangerous, or to make it secure if it is unused, uninhabited or abandoned and open to the weather. If it appears that such structure would be especially unsafe in case of fire, it shall be deemed dangerous within the meaning hereof, and the local inspector may affix in a conspicuous place upon its exterior walls a notice of its dangerous condition, which shall not be removed or defaced without authority from him."

General Laws c. 143, § 9, provides, in pertinent part, that if a structure is reported "to be dangerous or to be unused, uninhabited or abandoned, and open to the weather, and if the owner, lessee or mortgagee in possession continues such refusal or neglect, the local inspector shall cause it to be made safe or taken down or to be made secure, and, if the public safety so requires, said local inspector may at once enter the structure, the land on which it stands or the abutting land or building, with such assistance as he may require, and secure or remove the same, and may remove and evict, under the pertinent provisions of chapter two hundred thirty-nine or otherwise, any tenant or occupant thereof, and may erect such protection for the public by proper fence or otherwise as may be necessary, and for this purpose may close a public highway."
We also note that the plaintiffs cite a provision of the building code, 780 Code Mass. Regs. § 2203.7, which provides that "[a]ny existing building shall provide at least two (2) means of egress serving every story which are acceptable to the building official." See also 780 Code Mass. Regs. § 123.1 (1980) (substantially restating G.L.c. 143, § 6).
