; and (B) by inserting or an alien with an unknown status after undocumented criminal alien each place that term appears; (2) by striking paragraphs (2) and (3) and inserting the following: (2) Compensation (A) Calculation of compensation Compensation under paragraph (1)(A) shall be the average cost of incarceration of a prisoner in the relevant State, as determined by the Attorney General. (B) Compensation of state for incarceration The Attorney General shall compensate the State or political subdivision of the State, in accordance with subparagraph (A), for the incarceration of an alien— (i) whose immigration status cannot be verified by the Secretary; and (ii) who would otherwise be an undocumented criminal alien if the alien is unlawfully present in the United States. (3) Definitions In this subsection: (A) Alien with an unknown status The term alien with an unknown status means an individual— (i) who has been incarcerated by a Federal, State, or local law enforcement entity; and (ii) whose immigration status cannot be definitively identified. (B) Undocumented criminal alien The term undocumented criminal alien means an alien who— (i) has been charged with or convicted of a felony or any misdemeanors; and (ii) (I) entered the United States without inspection or at any time or place other than as designated by the Secretary; (II) was the subject of exclusion or deportation or removal proceedings at the time he or she was taken into custody by the State or a political subdivision of the State; or (III) was admitted as a nonimmigrant and, at the time he or she was taken into custody by the State or a political subdivision of the State, has failed to maintain the nonimmigrant status in which the alien was admitted or to which it was changed under section 248, or to comply with the conditions of any such status. ; (3) in paragraph (4), by inserting and aliens with an unknown status after undocumented criminal aliens each place that term appears