; and (B) permit the alien a reasonable opportunity to apply for such status. (3) Treatment of aliens previously ordered removed (A) In general If an alien who meets the eligibility requirements set forth in subsection (a) is present in the United States and has been ordered excluded, deported, or removed, or ordered to depart voluntarily from the United States under any provision of the Immigration and Nationality Act— (i) notwithstanding such order or section 241(a)(5) of the Immigration and Nationality Act ( 8 U.S.C. 1231(a)(5) ), the alien may apply for blue card status under this section; and (ii) if the alien is granted such status, the alien may file a motion to reopen the exclusion, deportation, removal, or voluntary departure order, which motion shall be granted. (B) Limitations on motions to reopen The limitations on motions to reopen set forth in section 240(c)(7) of the Immigration and Nationality Act ( 8 U.S.C. 1229a(c)(7) ) shall not apply to motions filed under subparagraph (A)(ii). (4) Period pending adjudication of application During the period beginning on the date on which an alien applies for blue card status under this section and ending on the date on which the Secretary makes a final decision regarding such application, the alien— (A) is eligible to apply for advance parole; (B) may not be detained by the Secretary or removed from the United States unless the Secretary makes a prima facie determination that such alien is, or has become, ineligible for blue card status under subsection (d)(2); (C) shall not be considered unlawfully present under section 212(a)(9)(B) of the Immigration and Nationality Act ( 8 U.S.C. 1182(a)(9)(B) ); and (D) shall not be considered an unauthorized alien (as defined in section 274A(h)(3) of the Immigration and Nationality Act ( 8 U.S.C. 1324a(h)(3) )). (5) Effect of departure Section 101(g) of the Immigration and Nationality Act ( 8 U.S.C. 1101(g) ) shall not apply to an alien granted— (A) advance parole under paragraph (4)(A) to reenter the United States