The following persons are exempt from military duty:
First, all persons in the army or navy or volunteers force of the United States and those who have been honorably discharged therefrom; all persons who have served in the Kansas national guard for the term of four years and have been honorably discharged; all the judges and clerks of the several courts of the state and the county treasurers.
Second, incapacitated persons, mentally ill persons, and persons convicted of infamous crimes.
Third, all persons who are members of any well recognized religious sect or organization at present organized and existing whose creed forbids its members to participate in war in any form, and whose religious convictions are against war or participation therein, in accordance with the creed of said religious organization: Provided, That the aforesaid exempted persons included in the first subdivision of this section shall be liable to military duty in case of war, insurrection or invasion, or imminent danger thereof.
K.S.A. 48-102