A. Notwithstanding any other law, a county may acquire by purchase or any other means land that is located within a city or town only if acquisition of the land is part of a management agreement agreed to by the governing body of the city or town.

B. This section does not apply to land that is acquired by purchase or any other means and that is for the primary purpose of public safety, health care or court operations.