The inspector of buildings, building commissioner or local inspector, or if there are none, in a town, the board of selectmen, or person or board designated by local ordinance or by-law, shall be charged with the enforcement of the zoning ordinance or by-law and shall withhold a permit for the construction, alteration or moving of any building or structure if the building or structure as constructed, altered or moved would be in violation of any zoning ordinance or by-law; and no permit or license shall be granted for a new use of a building, structure or land which use would be in violation of any zoning ordinance or by-law. If the officer or board charged with enforcement of zoning ordinances or by-laws is requested in writing to enforce such ordinances or by-laws against any person allegedly in violation of the same and such officer or board declines to act, he shall notify, in writing, the party requesting such enforcement of any action or refusal to act, and the reasons therefor, within fourteen days of receipt of such request.
No local zoning by-law or ordinance shall assess a penalty of more than $300 per violation; provided, however, that nothing in this section shall be construed to prohibit local zoning by-laws or ordinances from providing that each day the violation continues shall constitute a separate offense. No action, suit or proceeding shall be maintained in a court, nor an administrative action or other action taken to recover a fine or damages or to compel the removal, alteration or relocation of a structure or part of a structure because of a violation of a zoning by-law or ordinance except in accordance with this section and sections 8 and 17. If real property has been improved and used in accordance with the terms of the original building permit, no criminal or civil action intended to compel the abandonment, limitation or modification of the use allowed by the permit or the removal, alteration or relocation of a structure erected in reliance upon the permit by reason of an alleged violation of this chapter or of an ordinance or by-law adopted under this chapter shall be maintained unless the action, suit or proceeding is commenced and notice of the action, suit or proceeding is recorded in the registry of deeds for each county or district in which the land lies or, in the case of registered land, the notice is filed in the registry district in which the land lies within 6 years of the commencement of the alleged violation. No criminal or civil action intended to compel the removal, alteration, or relocation of a structure by reason of an alleged violation of this chapter or of an ordinance or by-law adopted under this chapter or the conditions of a variance or special permit shall be maintained unless the action, suit or proceeding is commenced and notice of the action, suit or proceeding is recorded in the registry of deeds for each county or district in which the land lies or, in the case of registered land, the notice is filed in the registry district in which the land lies within 10 years of the commencement of the alleged violation.
If real property has been improved by the erection or alteration of 1 or more structures and the structures or alterations have been in existence for a period of at least 10 years and no notice of an action, suit or proceeding as to an alleged violation of this chapter or of an ordinance or by-law adopted under this chapter has been recorded in the registry of deeds for the county or district in which the real estate is located or, in the case of registered land, has been filed in the registry district in which the land is located within a period of 10 years from the date the structures were erected, then the structures shall be deemed, for zoning purposes, to be legally non-conforming structures subject to section 6 and any local ordinance or by-law relating to non-conforming structures.
Notice of an action, suit or proceeding shall include the name of not less than 1 of the owners of record, the name of the person initiating the action and adequate identification of the structure and the alleged violation.
The superior court and the land court shall have the jurisdiction to enforce the provisions of this chapter, and any ordinances or by-laws adopted thereunder, and may restrain by injunction violations thereof.
Mass. Gen. Laws ch. 40A, § 7