; or (ii) has participated in the activities of a criminal gang, knowing or having reason to know that such activities will promote, further, aid, or support the illegal activity of the criminal gang. . (d) Designation (1) In general Chapter 2 of title II of the Immigration and Nationality Act ( 8 U.S.C. 1181 et seq.) is amended by adding at the end the following: 220. Designation of criminal gangs (a) In general The Secretary of Homeland Security, in consultation with the Attorney General, or the Secretary of State may designate a group or association as a criminal gang if their conduct is described in section 101(a)(53) or if the group or association conduct poses a significant risk that threatens the security and the public safety of nationals of the United States or the national security, homeland security, foreign policy, or economy of the United States. (b) Effective date A designation made under subsection (a) shall remain in effect until the designation is revoked after consultation between the Secretary of Homeland Security, the Attorney General, and the Secretary of State or is terminated in accordance with Federal law. . (2) Clerical amendment The table of contents in the first section of the Immigration and Nationality Act is amended by inserting after the item relating to section 219 the following: 220. Designation of criminal gangs. . (e) Mandatory detention of criminal gang members (1) In general Section 236(c)(1)(D) of the Immigration and Nationality Act ( 8 U.S.C. 1226(c)(1)(D) ) is amended— (A) by striking section 212(a)(3)(B) and inserting paragraph (2)(J) or (3)(B) of section 212(a)