; (II) a potential witness; (III) a person cooperating with an investigation into major criminal activity; or (IV) an immediate family member or close associate of a witness, potential witness, or person cooperating with such an investigation; and (ii) the alien demonstrates to the satisfaction of the Secretary that the alien— (I) is not a flight risk; (II) poses no danger to the safety of other persons or of property; (III) is not a threat to national security or public safety; and (IV) is likely to appear at any scheduled proceeding. (B) Arrested, but not convicted, aliens (i) Release for proceedings The Secretary may release any alien held pursuant to paragraph (1) to the appropriate authority for any proceedings subsequent to the arrest. (ii) Resumption of custody If an alien is released pursuant to clause (i), the Secretary shall— (I) resume custody of the alien during any period pending the final disposition of any such proceedings that the alien is not in the custody of such appropriate authority