; (B) the number of criminal aliens processed by the U.S. Customs and Border Protection agent or officer or U.S. Immigration and Customs Enforcement agent or investigator during the temporary duty assignment; and (C) the number of criminal aliens transferred from State to Federal custody during the agreement period. . (b) Detention, release, and removal of aliens ordered removed (1) Removal period (A) In general Section 241(a)(1)(A) of the Immigration and Nationality Act ( 8 U.S.C. 1231(a)(1)(A) ) is amended by striking Attorney General and inserting Secretary . (B) Beginning of period Section 241(a)(1)(B) of such Act ( 8 U.S.C. 1231(a)(1)(B) ) is amended to read as follows: (B) Beginning of period (i) In general Subject to clause (ii), the removal period begins on the date that is the latest of the following: (I) If a court, the Board of Immigration Appeals, or an immigration judge orders a stay of the removal of the alien, the date on which the stay of removal ends. (II) If the alien is ordered removed, the date pursuant to an administratively final removal order and the Secretary takes the alien into custody for removal. (III) If the alien is detained or confined (except under an immigration process), the date on which the alien is released from detention or confinement. (ii) Beginning of removal period following a transfer of custody If the Secretary transfers custody of the alien pursuant to law to another Federal agency or to an agency of a State or local government in connection with the official duties of such agency, the removal period for the alien— (I) shall be tolled