If the party charged is in the custody of an officer by virtue of a legal order or process, civil or criminal, except upon a sentence for felony, an order may be made for production of the party by the officer having custody, that the party may answer; and the party shall thereupon be produced and held until an order is made for disposition.
Minn. Stat. § 588.05
(9797) RL s 4643; 1986 c 444