Section 77. After foreclosure by a town of the rights of redemption under a tax title or taking, as hereinbefore provided, the land shall thereafter be held and disposed of like any land belonging to it and held for municipal purposes, and shall not while so held be assessed for taxes.

Before foreclosure so much of the provisions of any covenant or agreement running with the land as calls for the payment of money by the owner thereof shall not be enforceable against a town which is the owner of record of such land under a tax title or taking, except as hereinafter provided. After foreclosure the town while it is the owner of record of such land may apply to the commissioner for an extension of the time during which such provisions shall not be enforceable against it. The commissioner shall have the power in his discretion to grant such an extension for a period not exceeding one year from the date of the foreclosure, and thereafter, from time to time, upon similar applications, may in his discretion grant similar additional extensions. Any such extension shall be in writing, may be recorded in the appropriate registry of deeds, and if so recorded within thirty days from its date, shall be conclusive in favor of the town. In no event, however, shall such provisions calling for the payment of money be so suspended and inoperative during any period in which such town directly or indirectly in any capacity accepts or receives the benefit of such covenant or agreement or of any right or privilege created or affected thereby.