The county boards of education of two or more counties shall have power to provide jointly for the maintenance of schools in or near the dividing line of such counties on the basis of the enrollment in such school from the counties represented. Each pupil who lives within five miles of a county boundary line shall attend the school nearest to his residence. The administration and supervision of such school shall be placed under one of the county boards of education of said counties by agreement between the county boards of education, and if no agreement as to administration and supervision is made, it shall be under the board of education of the county in which the schoolhouse is located.
Ala. Code § 16-8-18 (1975)