No person shall be discharged under the provisions of this chapter who is in custody or held by virtue of any legal engagement or enlistment in the Army or Navy of the United States, or who, being subject to the rules and articles of war, is confined by one legally acting under the authority thereof, or who is held as prisoner of war under the authority of the United States, or who is in custody for any treason, felony, or other high misdemeanor, committed in any other state or territory of the United States, and by the Constitution and laws of the United States, ought to be delivered up to such state or territory.
§ 532.390, RSMo