It shall be the duty of the court or judge forthwith to remand such party if it appears that the party is legally detained in custody, either:\n(1) By virtue of process issued by any court, or judge or commissioner or any other officer thereof, of the United States, in a case where such court, or judge or officer thereof, has exclusive jurisdiction; or,\n(2) By virtue of the judgment of any court, or of any execution issued upon such judgment; or,\n(3) For any contempt, specially and plainly charged in the commitment, by some court, officer or body having authority to commit for the contempt so charged; and,\n(4) That the time during which such party may legally be detained has not expired. [Amended by 2003 c.576 §314]
Oregon Legal Code