; (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 Subparagraph (A) of section 241(a)(1) of the Immigration and Nationality Act ( 8 U.S.C. 1231(a)(1)(A) ) is amended by striking Attorney General and inserting Secretary of Homeland Security . (B) Beginning of period Subparagraph (B) of section 241(a)(1) of the Immigration and Nationality 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 the stay of removal ends; (II) If the alien is ordered removed, the date the removal order becomes administratively final 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 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