If the judge decides that an alien shall be removed, the alien shall be detained pending the outcome of any appeal. After the conclusion of any judicial review thereof which affirms the removal order, the Attorney General shall retain the alien in custody and remove the alien to a country specified under paragraph (2).
The removal of an alien shall be to any country which the alien shall designate if such designation does not, in the judgment of the Attorney General, in consultation with the Secretary of State, impair the obligation of the United States under any treaty (including a treaty pertaining to extradition) or otherwise adversely affect the foreign policy of the United States.
If the alien refuses to designate a country to which the alien wishes to be removed or if the Attorney General, in consultation with the Secretary of State, determines that removal of the alien to the country so designated would impair a treaty obligation or adversely affect United States foreign policy, the Attorney General shall cause the alien to be removed to any country willing to receive such alien.
If no country is willing to receive such an alien, the Attorney General may, notwithstanding any other provision of law, retain the alien in custody. The Attorney General, in coordination with the Secretary of State, shall make periodic efforts to reach agreement with other countries to accept such an alien and at least every 6 months shall provide to the attorney representing the alien at the removal hearing a written report on the Attorney General’s efforts. Any alien in custody pursuant to this subparagraph shall be released from custody solely at the discretion of the Attorney General and subject to such conditions as the Attorney General shall deem appropriate.
Before an alien is removed from the United States pursuant to this subsection, or pursuant to an order of removal because such alien is inadmissible under section 1182(a)(3)(B) of this title, the alien shall be photographed and fingerprinted, and shall be advised of the provisions of section 1326(b) of this title.
Pending the commencement of any service of a sentence of confinement by an alien described in paragraph (1), such an alien shall remain in the custody of the Attorney General, unless the Attorney General determines that temporary release of the alien to the custody of State authorities for confinement in a State facility is appropriate and would not endanger national security or public safety.
Following the completion of a sentence of confinement by an alien described in paragraph (1), or following the completion of State criminal proceedings which do not result in a sentence of confinement of an alien released to the custody of State authorities pursuant to paragraph (2), such an alien shall be returned to the custody of the Attorney General who shall proceed to the removal of the alien under this subchapter.
For purposes of sections 751 and 752 of title 18, an alien in the custody of the Attorney General pursuant to this subchapter shall be subject to the penalties provided by those sections in relation to a person committed to the custody of the Attorney General by virtue of an arrest on a charge of a felony.
An alien in the custody of the Attorney General pursuant to this subchapter shall have the right to contact an appropriate diplomatic or consular official of the alien’s country of citizenship or nationality or of any country providing representation services therefore. The Attorney General shall notify the appropriate embassy, mission, or consular office of the alien’s detention.