A foreclosing owner that evicts a tenant in violation of this chapter or any ordinance or by-law adopted pursuant to this chapter, shall be punished by a fine of not less than $5,000. Each such illegal eviction shall constitute a separate offense.
The 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.
Mass. Gen. Laws ch. 186A, § 6