Each such illegal eviction shall constitute a separate offense.\nThe district and superior courts and the housing court shall have jurisdiction over an action arising from a violation of this chapter or of any ordinance or by-law adopted pursuant to this chapter, and shall have jurisdiction in equity to restrain any such violation. It shall be a defense to an eviction proceeding that the foreclosing owner attempted to evict a tenant in violation of this chapter or any ordinance or by-law adopted pursuant to this chapter.
Massachusetts Legal Code