; and (B) except as provided in paragraph (2), shall not co-locate in detention facilities persons charged with or convicted of offenses against the United States if those persons are not of the same biological sex. (2) Exception The Bureau of Prisons may co-locate, on a temporary basis (which shall not include overnight housing), persons charged with or convicted of offenses against the United States who are not of the same biological sex. . (2) Technical and conforming amendment The table of sections for chapter 303 of title 18, United States Code, is amended by adding at the end the following: 4052. Bar on housing together prisoners of different sexes. . (b) State prisons Section 501 of title I of the Omnibus Crime Control and Safe Streets Act of 1968 ( 34 U.S.C. 10152 ) is amended by adding at the end the following: (i) Bar on housing together prisoners of different sexes (1) Definition In this subsection, the term biological sex has the meaning given such term in section 4052 of title 18, United States Code. (2) Limitation on eligibility for funds (A) In general Beginning in the first fiscal year beginning after the date of enactment of this subsection, a State may not receive funds under this subpart for a fiscal year if the State does not submit to the Attorney General a certification that the State— (i) except as provided in subparagraph (B), prohibits co-locating in detention facilities persons charged with or convicted of offenses under the law of the State if those persons are not of the same biological sex; and (ii) requires the use of the biological sex of persons charged with or convicted of offenses under the law of the State in making determinations regarding housing such persons. (B) Exception A State may co-locate, on a temporary basis (which shall not include overnight housing), persons charged with or convicted of offenses under the law of the State who are not of the same biological sex. .