; and (ii) if discharged or released from service in the Armed Forces, was discharged or released under honorable conditions; and (B) is the beneficiary of a petition for classification under section 204(a)(1)(A) as an immediate relative (as defined in section 201(b)) by reason of the marriage to such citizen. . 4. Eligibility of removed or voluntarily departed aliens (a) In general The Secretary of Homeland Security and the Secretary of State shall take such steps as may be necessary to ensure that eligible aliens who were removed or permitted to depart voluntarily from the United States before the date of the enactment of this Act may apply from abroad for an immigrant visa pursuant to the amendment made by section 3. (b) Nonimmigrant admission pending adjudication The Secretary of Homeland Security and the Secretary of State shall establish a program under which an eligible alien with a pending application made under subsection (a) may be authorized to enter the United States as a nonimmigrant to reunite with their United States citizen spouse during the period in which such application, and an associated application for adjustment of status, remain pending. In determining whether an alien is eligible to be admitted to the United States as a nonimmigrant under this subsection, the Secretary of Homeland Security and the Secretary of State shall require the alien to establish to the satisfaction of each Secretary that the alien does not pose a threat to the public or to national security. In determining the admissibility as a nonimmigrant of an alien described in this subsection, the Secretary of Homeland Security, in the discretion of the Secretary, may waive the application of paragraphs (6)(C) and (9) of section 212(a) of the Immigration and Nationality Act ( 8 U.S.C. 1182(a) ).