If the debtor tenders the amount justly due for redemption, and the creditor or, in case of a sale, the purchaser does not within seven days after the tender release the land as before provided, the debtor may recover it, with costs, in an action to recover a freehold estate against the creditor or purchaser as a disseisor; but before judgment therein is entered for him, he shall bring into court for the use of the creditor or purchaser the amount so tendered.
Mass. Gen. Laws ch. 236, § 38