If any real estate, levied upon by virtue of any valid writ of execution by any sheriff, shall have been or shall be sold by him under such levy during the term of his office, but shall not have been conveyed by deed by such sheriff during the term of his office, or if conveyed, the deed conveying the same shall have been lost before the record thereof, and the purchaser thereof shall have entered into and remained in possession of such real estate pursuant to such sale and purchase, such sheriff shall have full power, after the expiration of his term of office, to execute and deliver to the purchaser from him of any such real estate, a good and sufficient deed. If for any cause such sheriff is unable to execute and deliver his deed, the sheriff then in office is authorized and empowered to make, execute and deliver a good and sufficient deed to effectuate such conveyance. Either of said deeds shall have the same force and effect as if the sheriff first-mentioned had executed and delivered the same during his term of office.
N.J.S. § 2A:17-48