Minn. Stat. § 253D.10
Subd. 1. Jails.
During any hearing held under this chapter, or pending revocation of a provisional discharge, the court may order the committed person or proposed committed person temporarily confined in a jail or lockup but only if:
Subd. 2. Correctional facilities.
(b) A court may order that a person who is being petitioned for commitment under this chapter be confined in a Department of Corrections facility pursuant to the judicial hold order under the following circumstances and conditions:
(1) The person is currently serving a sentence in a Department of Corrections facility and the court determines that the person has made a knowing and voluntary (i) waiver of the right to be held in a secure treatment facility and (ii) election to be held in a Department of Corrections facility. The order confining the person in the Department of Corrections facility shall remain in effect until the court vacates the order or the person's criminal sentence and conditional release term expire.
In no case may the person be held in a Department of Corrections facility pursuant only to this clause, and not pursuant to any separate correctional authority, for more than 210 days.