After administering the oath in 25-14-306, the judge shall issue an order that the prisoner be discharged from custody, and the officer, upon the service of the order, shall discharge the prisoner if the prisoner is not imprisoned for another cause.
ยง 25-14-307, MCA