The articles of uniform code of military justice [10 U.S.C. 801 - 950] in effect on December 31, 2022, governing the armed forces of the United States and the Manual for Courts-Martial, United States, 2019 edition, are a part of this title so far as the articles are applicable and not modified by any provision of this title. An individual who commits an offense while on military duty status, including state active duty, may be tried by a court-martial lawfully appointed even after the duty has terminated, and if found guilty, the accused must be punished according to the articles of uniform code of military justice and the rules and regulations governing the armed forces of the United States, within the limits prescribed in this title and by federal law for the courts-martial in the national guard. In any case in which the individual alleged to have committed the offense could be charged either under the code of military justice or the civil law of this state, the officer whose duty it is to approve the charge, in the officer's discretion, may order the person charged or subject to being charged to be turned over to the civil authorities for trial. Commanders may administer nonjudicial punishment for offenses while on military duty status, including state active duty, in accordance with part V, Manual for Courts-Martial, except the service member may not demand a trial by courts-martial. When reference is made to the articles of uniform code of military justice, to the military service, or to the armed forces of the United States, the reference must be deemed to include the military service of this state. Laws of this state affecting the military forces must be construed to conform to all acts and regulations of the United States affecting the same subjects.
N.D.C.C. § 37-01-03