The purchase by the holder of the mortgage of the real estate, or any interest therein, sold under a judgment in a foreclosure authorized by this article shall not result in a merger of the fee and the mortgage interest. The real estate so purchased may be held or conveyed subject to the lien of the mortgage as stated in the judgment, and the mortgage may be assigned as a valid and subsisting lien upon the real estate therein described.
N.J.S. § 2A:50-51