; no judicial review A decision of an immigration officer under this clause, and the issuance of a repatriation order, shall be in the sole, unreviewable discretion of the immigration officer. (iv) Detention during proceedings (I) In general Except as provided in subclause (II), notwithstanding any other provision of law, settlement agreement, or consent decree, an unaccompanied alien child shall not be released from the custody of the Secretary of Homeland Security or the Director of the Office of Refugee Resettlement during the pendency of the immigration or removal proceedings of the unaccompanied alien child. (II) Exception An unaccompanied alien child may be released in the sole, unreviewable discretion of the Director of the Office of Refugee Resettlement. ; and (D) in subparagraph (C)— (i) by amending the subparagraph heading to read as follows: Agreements with foreign countries.— ; and (ii) in the matter preceding clause (i), by striking countries contiguous to the United States and inserting Canada, El Salvador, Guatemala, Honduras, Mexico, and any other foreign country the Secretary considers appropriate ; (2) by striking paragraph (3); (3) by redesignating paragraphs (4) and (5) as paragraphs (3) and (4), respectively; and (4) in paragraph (4)(D), as so redesignated, by striking from a contiguous country . (c) Protecting integrity of special immigrant juvenile visa program Section 101(a)(27)(J) of the Immigration and Nationality Act ( 8 U.S.C. 1101(a)(27)(J) ) is amended— (1) in clause (i), by striking , and whose and all that follows through State law ; and (2) in clause (iii)— (A) in subclause (I), by striking and at the end; and (B) by adding at the end the following: (III) an alien may not be granted special immigrant juvenile status under this subparagraph if the reunification of the alien with any parent or legal guardian of the alien is not precluded by abuse, neglect, abandonment, or any similar cause under State law