MGL 239, sec 2A (retaliation)

MGL 239, Section 2A. It shall be a defense to an action for summary process that such action or the preceding action of terminating the tenant’s tenancy, was taken against the tenant for the tenant’s act of commencing, proceeding with, or obtaining relief in any judicial or administrative action the purpose of which action was to obtain damages under or otherwise enforce, any federal, state or local law, regulation, by-law, or ordinance, which has as its objective the regulation of residential premises, or exercising rights pursuant to section one hundred and twenty-four D of chapter one hundred and sixty-four, or reporting a violation or suspected violation of law as provided in section eighteen of chapter one hundred and eighty-six, or organizing or joining a tenants’ union or similar organization or making, or expressing an intention to make, a payment of rent to an organization of unit owners pursuant to paragraph (c) of section six of chapter one hundred and eighty-three A. The commencement of such action against a tenant, or the sending of a notice to quit upon which the summary process action is based, or the sending of a notice, or performing any act, the purpose of which is to materially alter the terms of the tenancy, within six months after the tenant has commenced, proceeded with or obtained relief in such action, exercised such rights, made such report, organized or joined such tenants’ union, or made or expressed an intention to make a payment of rent to an organization of unit owners, or within six months after any other person has taken such action or actions on behalf of the tenant or relating to the building in which such tenant resides, shall create a rebuttable presumption that such summary process action is a reprisal against the tenant for engaging in such activities or was taken in the belief that the tenant had engaged in such activities. Such presumption may be rebutted only by clear and convincing evidence that such action was not a reprisal against the tenant and that the plaintiff had sufficient independent justification for taking such action, and would have in fact taken such action, in the same manner and at the same time the action was taken, even if the tenant had not commenced any legal action, made such report or engaged in such activity.