(a) (1) Subject to subsection (c) of this section, a qualified contractor may collect payments under a regulated sustainable energy contract that are in arrears, including the principal, interest, late charges, costs of collection, and reasonable attorney’s fees, by the imposition of a lien on property that is subject to the contract in accordance with the Maryland Contract Lien Act, Title 14, Subtitle 2 of the Real Property Article.
(2) A lien imposed under paragraph (1) of this subsection may not take priority over a lien, mortgage, deed of trust, or other security interest that is already attached to the property.
(b) If a property subject to a regulated sustainable energy contract is foreclosed under Title 7, Subtitle 1 of the Real Property Article, any deficiency due as a result of a lien arising from the regulated sustainable energy contract shall be:
(1) added to the total balance due on the contract; and
(2) subject to periodic payment as provided in the contract.
(c) (1) If a party that holds a recorded mortgage or deed of trust on a property subject to a regulated sustainable energy contract acquires the property through foreclosure, the party may not be charged for any amount due on the regulated sustainable energy contract.
(2) Payment on a regulated sustainable energy contract shall resume when the property subject to the regulated sustainable energy contract is sold or transferred to a person who is not related to the person who held the recorded mortgage or deed of trust when the property was foreclosed.