Mass. Gen. Laws ch. 106, § 9-334
(d) Fixtures purchase-money priority. Except as otherwise provided in subsection (h), a perfected security interest in fixtures has priority over a conflicting interest of an encumbrancer or owner of the real property if the debtor has an interest of record in or is in possession of the real property and:
(e) Priority of security interest in fixtures over interests in real property. A perfected security interest in fixtures has priority over a conflicting interest of an encumbrancer or owner of the real property if:
(1) the debtor has an interest of record in the real property or is in possession of the real property and the security interest:
(2) before the goods become fixtures, the security interest is perfected by any method permitted by this article and the fixtures are readily removable:
(4) the security interest is:
(f) Priority based on consent, disclaimer, or right to remove. A security interest in fixtures, whether or not perfected, has priority over a conflicting interest of an encumbrancer or owner of the real property if: