; and (2) by inserting after section 2004 the following new section: 2004a. Detail as students at law schools: certain enlisted members (a) In general The Secretary of each military department may, under regulations prescribed by the Secretary of Defense, detail enlisted members of the armed forces as students at accredited law schools, located in the United States, for a period of training leading to the degree of bachelor of laws or juris doctor. No more than twenty-five officers from each military department may commence such training in any single fiscal year. (b) Eligibility for detail To be eligible for detail under subsection (a), a member must be a citizen of the United States and must— (1) as of the time training is to begin— (A) have served on active duty for a period of not less than four years nor more than eight years; (B) be in pay grade E–5 or E–6; and (C) meet all requirements for acceptance of a commission as a commissioned officer in the armed forces; and (2) sign an agreement that, unless sooner separated, the member will— (A) complete the educational course of legal training; (B) upon completion of the educational course of legal training— (i) accept a commission as a commissioned officer in the armed forces; and (ii) accept transfer or detail as a judge advocate or law specialist within the department concerned