If the jury is discharged because the court has not jurisdiction of the offense charged, and it appears that it was committed out of the jurisdiction of this state, the defendant must be discharged, unless the court orders that the defendant be detained for a reasonable time, to be specified in the order, to enable the state's attorney to communicate with the chief executive officer of the country, state, territory, or district where the offense charged was committed.
N.D.C.C. § 29-21-20