Whenever the school board of any school district determines that any schoolhouse site with or without a building thereon is of no further use to the district and agrees with the school board of any other school district, within or adjacent to the boundaries of which the site is situated, upon the sale thereof to such district and the price to be paid therefor, and such sites are selected by the purchasing district in the manner prescribed by law, after the payment of the compensation the trustees of schools of the township, regional board of school trustees, township land commissioners, or school board having legal title to the site shall, by proper deed of conveyance or instrument in writing, convey legal title to, or transfer the use of the site to, the purchasing district in accordance with applicable provisions of this Code.
105 ILCS 5/16-3