whichever occurs later. (3) Attorney’s fee and other costs In any action or proceeding under this subsection the court shall allow a prevailing plaintiff a reasonable attorneys’ fee as part of the costs, and include expert fees as part of the attorneys’ fee. 4. Sarah and Grant’s Law (a) Detention of aliens during removal proceedings (1) Clerical amendments (A) Section 236 of the Immigration and Nationality Act ( 8 U.S.C. 1226 ) is amended by striking Attorney General each place it appears (except in the second place that term appears in section 236(a)) and inserting Secretary of Homeland Security . (B) Section 236(a) of such Act ( 8 U.S.C. 1226(a) ) is amended by inserting the Secretary of Homeland Security or before the Attorney General— . (C) Section 236(e) of such Act ( 8 U.S.C. 1226(e) ) is amended by striking Attorney General’s and inserting Secretary of Homeland Security’s . (2) Length of detention Section 236 of such Act ( 8 U.S.C. 1226 ) is amended by adding at the end the following: (f) Length of detention (1) In general Notwithstanding any other provision of this section, an alien may be detained, and for an alien described in subsection (c) shall be detained, under this section without time limitation, except as provided in subsection (h), during the pendency of removal proceedings. (2) Construction The length of detention under this section shall not affect detention under section 241. . (3) Detention of criminal aliens Section 236(c)(1) of such Act ( 8 U.S.C. 1226(c)(1) ) is amended— (A) in subparagraph (C), by striking or at the end