; and (B) set bond at an amount no greater than necessary to ensure the alien’s appearance for removal proceedings. (2) Inability to pay bond The Secretary of Homeland Security may not continue to detain an alien solely based on the alien’s inability to pay bond. (c) Custody determination (1) Initial determination (A) In general Not later than 48 hours after taking an alien into custody pursuant to this section or section 235, or with respect to an alien subject to a reinstated order of removal pursuant to section 241(a)(5) who has been found to have a credible or reasonable fear of return, the Secretary of Homeland Security shall make an initial custody determination with regard to the alien, and provide such determination in writing to the alien. (B) Least restrictive conditions With respect to a custody determination under subparagraph (A), if the Secretary determines that the release of an alien will not reasonably ensure the appearance of the alien as required or will endanger the safety of any other person or the community, the Secretary shall impose the least restrictive conditions, as described in paragraph (4). (2) Timing (A) In general An alien who seeks to challenge the initial custody determination under paragraph (1) shall be provided with the opportunity for a hearing before an immigration judge not later than 72 hours after the initial custody determination to determine whether the alien should be detained. (B) Access to counsel On request by an alien, or the legal counsel of an alien, an immigration judge may grant a reasonable continuance of a hearing under subparagraph (A) to provide the alien or such legal counsel additional time to prepare for the hearing. (3) Presumption of release (A) In general In a hearing under this subsection, there shall be a presumption that the alien should be released. (B) Rebuttal (i) In general The Secretary of Homeland Security has the duty of rebutting this presumption, which may only be shown based on clear and convincing evidence, including credible and