Section 42. Towns accepting the provisions of this section and sections forty-three and forty-four, or which have accepted corresponding provisions of earlier laws may establish a fire department to be under the control of an officer to be known as the chief of the fire department. The chief shall be appointed by the selectmen, and shall receive such salary as the selectmen may from time to time determine, not exceeding in the aggregate the amount annually appropriated therefor. He may be removed for cause by the selectmen at any time after a hearing. He shall have charge of extinguishing fires in the town and the protection of life and property in case of fire. He shall purchase subject to the approval of the selectmen and keep in repair all property and apparatus used for and by the fire department. He shall have and exercise all the powers and discharge all the duties conferred or imposed by statute upon engineers in towns except as herein provided, and shall appoint a deputy chief and such officers and firemen as he may think necessary, and may remove the same at any time for cause and after a hearing. He shall have full and absolute authority in the administration of the department, shall make all rules and regulations for its operation, shall report to the selectmen from time to time as they may require, and shall annually report to the town the condition of the department with his recommendations thereon; he shall fix the compensation of the permanent and call members of the fire department subject to the approval of the selectmen. In the expenditure of money the chief shall be subject to such further limitations as the town may from time to time prescribe. The appointment of the chief of the fire department in any town or district having a population of five thousand or less may be for a period of three years.