(a) Under such regulations as the Secretary concerned may prescribe, a member of the armed forces accused of an offense against civil authority may be delivered, upon request, to the civil authority for trial.

(b) When delivery under this article is made to any civil authority of a person undergoing sentence of a court-martial, the delivery, if followed by conviction in a civil tribunal, interrupts the execution of the sentence of the court-martial, and the offender after having answered to the civil authorities for his offense shall, upon the request of competent military authority, be returned to military custody for the completion of his sentence.