; (x) the alien, having been convicted by a final judgment of a particularly serious crime, constitutes a danger to the community of the United States; (xi) there are serious reasons for believing that the alien has committed a serious nonpolitical crime outside the United States prior to the arrival of the alien in the United States; (xii) there are reasonable grounds for regarding the alien as a danger to the security of the United States; (xiii) the alien is described in subclause (I), (II), (III), (IV), or (VI) of section 212(a)(3)(B)(i) or section 237(a)(4)(B) (relating to terrorist activity), unless, in the case only of an alien inadmissible under subclause (IV) of section 212(a)(3)(B)(i), the Secretary of Homeland Security or the Attorney General determines, in the Secretary’s or the Attorney General's discretion, that there are not reasonable grounds for regarding the alien as a danger to the security of the United States; (xiv) the alien was firmly resettled in another country prior to arriving in the United States; or (xv) there are reasonable grounds for concluding the alien could avoid persecution by relocating to another part of the alien’s country of nationality or, in the case of an alien having no nationality, another part of the alien’s country of last habitual residence. (B) Special rules (i) Particularly serious crime; serious nonpolitical crime outside the United States (I) In general For purposes of subparagraph (A)(x), the Attorney General or Secretary of Homeland Security, in their discretion, may determine that a conviction constitutes a particularly serious crime based on— (aa) the nature of the conviction; (bb) the type of sentence imposed