; and (2) by amending subsection (d) to read as follows: (d) Detainer of criminal aliens (1) In general If an individual is arrested by a Federal, State, tribal, or local law enforcement official for a violation of any criminal law, the Secretary of Homeland Security (or his or her designee) may issue a detainer to the arresting agency if there is reason to believe the individual is an alien who may be removable from the United States. Notwithstanding any other provision of law, no court shall have jurisdiction to review the discretionary decision or action by the Secretary of Homeland Security (or his or her designee) to issue a detainer under this paragraph. (2) Transfer of custody Upon the issuance of a detainer by the Secretary of Homeland Security (or his or her designee) with respect to an alien described in paragraph (1), the arresting Federal, State, tribal, or local law enforcement agency is authorized to maintain custody of the alien for a period not to exceed 48 hours in order to transfer custody of the alien to the Department of Homeland Security. (3) Indemnification (A) In general Under such regulations as the Secretary of Homeland Security shall prescribe, the Secretary (or his or her designee) may enter into agreements with State, tribal, and local law enforcement agencies to indemnify such agencies against claims (including reasonable expenses of litigation or settlement) by third parties for wrongful detention resulting from detainers issued without reason to believe that the individual is an alien who may be removable from the United States. (B) Limitation Indemnification under subparagraph (A) does not extend to claims relating to the negligence or willful misconduct of a Federal, State, tribal, or local law enforcement agency or the conditions of detention in the facility used by such agency to detain the individual subject to the detainer. (C) Additional conditions Each indemnification agreement entered into pursuant to subparagraph (A) shall— (i) require the State, tribal, or local law