Notwithstanding any law to the contrary, when the governing body of a municipality determines that all or part of a tract of land, with or without improvements, owned by the municipality is not then needed for municipal purposes, it may, by ordinance, authorize a private sale and conveyance of the property, or any part thereof, to the county in which it is located, without compliance with any other law governing disposal of lands by municipalities, for a consideration which may be nominal, and containing a limitation that the lands or buildings shall be used only for public purposes or the county, and that if the lands or buildings are not used in accordance with the limitation, title thereto shall revert to the municipality without any entry or reentry made thereon on behalf of the municipality.
N.J.S. § 40A:12-13.4