SECTION 1. SHORT TITLE; TABLE OF CONTENTS.

    (a) Short Title.--This Act may be cited as the ``Keeping Families 
Together Act of 2005''.
    (b) Table of Contents.--The table of contents of this Act is as 
follows:

Sec. 1. Short title; table of contents.
Sec. 2. Restoration of definition of aggravated felony (repeal of 
                            section 321 of IIRIRA).
Sec. 3. Restoration of detention policy.
Sec. 4. Repeal of time stop provisions.
Sec. 5. Repeal of section 101(a)(48).
Sec. 6. Restoration of section 212(c).
Sec. 7. Restoration of judicial review provisions.
Sec. 8. Post-proceeding relief for affected aliens.

SEC. 2. RESTORATION OF DEFINITION OF AGGRAVATED FELONY (REPEAL OF 
              SECTION 321 OF IIRIRA).

    (a) In General.--Effective as if included in the enactment of the 
Illegal Immigration Reform and Immigrant Responsibility Act of 1996 
(division C of Public Law 104-208), section 321 of such Act is repealed 
and the provisions of law amended by such section are restored as if 
such section had not been enacted.
    (b) Restoration of Rights.--Any alien whose legal permanent 
resident status, application for permanent residence, or application 
for cancellation of removal, was affected by the changes in the 
definition of ``aggravated felony'' made by such section 321 may apply 
to the Secretary of Homeland Security to be considered for adjustment 
of status or cancellation of removal in conformance with the provisions 
of section 101(a)(43) of the Immigration and Nationality Act, as 
restored by subsection (a).

SEC. 3. RESTORATION OF DETENTION POLICY.

    (a) In General.--Section 236(c) of the Immigration and Nationality 
Act (8 U.S.C. 1226(c)) is amended to read as follows:
    ``(c) Detention of Criminal Aliens.--
            ``(1) In general.--The Secretary of Homeland Security shall 
        take into custody any alien convicted of an aggravated felony 
        upon release of the alien (regardless of whether or not such 
        release is on parole, supervised release, or probation, and 
        regardless of the possibility of rearrest or further 
        confinement in respect of the same offense). Notwithstanding 
        subsection (a) or section 241(a) but subject to paragraph (2), 
        the Secretary of Homeland Security shall not release such felon 
        from custody.
            ``(2) Non-release.--The Secretary of Homeland Security may 
        not release from custody any who has been convicted of an 
        aggravated felony, either before or after a determination of 
        removability, unless--
                    ``(A)(i) the alien was lawfully admitted, or
                    ``(ii) the alien was not lawfully admitted but the 
                alien cannot be removed because the designated country 
                of removal will not accept the alien; and
                    ``(B) the alien satisfies the Secretary of Homeland 
                Security that the alien will not pose a danger to the 
                safety of other persons or of property and is likely to 
                appear for any scheduled proceeding.''.
    (b) Effective Date.--The amendment made by subsection (a) shall be 
effective as if included in the Illegal Immigration Reform and 
Immigrant Responsibility Act of 1996.

SEC. 4. REPEAL OF TIME STOP PROVISIONS.

    (a) In General.--Section 240A(d) of the Immigration and Nationality 
Act (8 U.S.C. 1229b(d)) is repealed.
    (b) Effective Date.--The repeal made by subsection (a) shall be 
effective as if included in the enactment of subtitle A of title III of 
the Illegal Immigration Reform and Immigrant Responsibility Act of 
1996.

SEC. 5. REPEAL OF SECTION 101(A)(48).

    (a) In General.--Paragraph (48) of section 101(a)(48) of the 
Immigration and Nationality Act (8 U.S.C. 1101(a)) is repealed.
    (b) Effective Date.--The repeal made by subsection (a) shall take 
effect as if included in the enactment of section 322(a) of the Illegal 
Immigration Reform and Immigrant Responsibility Act of 1996.

SEC. 6. RESTORATION OF SECTION 212(C).

    (a) In General.--Section 212 of the Immigration and Nationality Act 
(8 U.S.C. 1182) is amended by inserting after subsection (b) the 
following new subsection:
    ``(c) Aliens lawfully admitted for permanent residence who 
temporarily proceeded abroad voluntarily and not under an order of 
deportation or removal, and who are returning to a lawful 
unrelinquished domicile of seven consecutive years, may be admitted in 
the discretion of the Secretary of Homeland Security without regard to 
the provisions of subsection (a) (other than paragraphs (3) and 
(10)(C)). Nothing contained in this subsection shall limit the 
authority of the Secretary of Homeland Security to exercise the 
discretion vested in him under section 211(b). The first sentence of 
this subsection shall not apply to an alien who has been convicted of 
one or more aggravated felonies and has served for such felony or 
felonies a term of imprisonment of at least 5 years.''.
    (b) Effective Date.--The amendment made by subsection (a) applies 
as of April 24, 1996, as if section 440(d) of the Antiterrorism and 
Effective Death Penalty Act of 1996 (Public Law 104-132) and section 
304(b) of Illegal Immigration Reform and Immigrant Responsibility Act 
of 1996 (division C of Public Law 104-208) had not been enacted.

SEC. 7. RESTORATION OF JUDICIAL REVIEW PROVISIONS.

    (a) In General.--Section 242 of the Immigration and Nationality Act 
(8 U.S.C. 1252) is amended to read as follows:

                 ``judicial review of orders of removal

    ``Sec. 242.  (a) The procedure prescribed by, and all the 
provisions of chapter 158 of title 28, United States Code, shall apply 
to, and shall be the sole and exclusive procedure for, the judicial 
review of all final orders of removal heretofore or hereafter made 
against aliens within the United States pursuant to administrative 
proceedings under section 240 of this Act or comparable provisions of 
any prior Act, except that--
            ``(1) a petition for review may be filed not later than 90 
        days after the date of the issuance of the final removal order, 
        or, in the case of an alien convicted of an aggravated felony 
        not later than 30 days after the issuance of such order;
            ``(2) the venue of any petition for review under this 
        section shall be in the judicial circuit in which the 
        administrative proceedings before an immigration judge were 
        conducted in whole or in part, or in the judicial circuit 
        wherein is the residence, as defined in this Act, of the 
        petitioner, but not in more than one circuit;
            ``(3) the action shall be brought against the Department of 
        Homeland Security, as respondent. Service of the petition to 
        review shall be made upon the Secretary of Homeland Security of 
        the United States and upon the official of the Department of 
        Homeland Security in charge of the district in which the office 
        of the clerk of the court is located. The service of the 
        petition for review upon such official of the Service shall 
        stay the removal of the alien pending determination of the 
        petition by the court, unless the court otherwise directs or 
        unless the alien is convicted of an aggravated felony, in which 
        case the Service shall not stay the removal of the alien 
        pending determination of the petition of the court unless the 
        court otherwise directs;
            ``(4) except as provided in clause (B) of paragraph (5) of 
        this subsection, the petition shall be determined solely upon 
        the administrative record upon which the removal order is based 
        and the Secretary of Homeland Security's findings of fact, if 
        supported by reasonable, substantial, and probative evidence on 
        the record considered as a whole, shall be conclusive;
            ``(5) whenever any petitioner, who seeks review of an order 
        under this section, claims to be a national of the United 
        States and makes a showing that his claim is not frivolous, the 
        court shall (A) pass upon the issues presented when it appears 
        from the pleadings and affidavits filed by the parties that no 
        genuine issue of material fact is presented; or (B) where a 
        genuine issue of material fact as to the petitioner's 
        nationality is presented, transfer the proceedings to a United 
        States district court for the district where the petitioner has 
        his residence for hearing de novo of the nationality claim and 
        determination as if such proceedings were originally initiated 
        in the district court under the provisions of section 2201 of 
        title 28, United States Code. Any such petitioner shall not be 
        entitled to have such issue determined under section 360(a) of 
        this Act or otherwise;
            ``(6) whenever a petitioner seeks review of an order under 
        this section, any review sought with respect to a motion to 
        reopen or reconsider such an order shall be consolidated with 
        the review of the order;
            ``(7) if the validity of a removal order has not been 
        judicially determined, its validity may be challenged in a 
        criminal proceeding against the alien for violation of 
        subsection (a) or (b) of section 243 of this Act only by 
        separate motion for judicial review before trial. Such motion 
        shall be determined by the court without a jury and before the 
        trial of the general issue. Whenever a claim to United States 
        nationality is made in such motion, and in the opinion of the 
        court, a genuine issue of material fact as to the alien's 
        nationality is presented, the court shall accord him a hearing 
        de novo on the nationality claim and determine that issue as if 
        proceedings had been initiated under the provisions of section 
        2201 of title 28, United States Code. Any such alien shall not 
        be entitled to have such issue determined under section 360(a) 
        of this Act or otherwise. If no such hearing de novo as to 
        nationality is conducted, the determination shall be made 
        solely upon the administrative record upon which the removal 
        order is based and the Secretary of Homeland Security's 
        findings of fact, if supported by reasonable, substantial, and 
        probative evidence on the record considered as a whole, shall 
        be conclusive. If the removal order is held invalid, the court 
        shall dismiss the indictment and the United States shall have 
        the right to appeal to the court of appeals within 30 days. The 
        procedure on such appeals shall be as provided in the Federal 
        rules of criminal procedure. No petition for review under this 
        section may be filed by any alien during the pendency of a 
        criminal proceeding against such alien for violation of 
        subsection (a) or (b) of section 243 of this Act;
            ``(8) nothing in this section shall be construed to require 
        the Secretary of Homeland Security to defer removal of an alien 
        after the issuance of a removal order because of the right of 
        judicial review of the order granted by this section, or to 
        relieve any alien from compliance with subsections (a) and (b) 
        of section 243 of this Act. Nothing contained in this section 
        shall be construed to preclude the Secretary of Homeland 
        Security from detaining or continuing to detain an alien or 
        from taking the alien into custody pursuant to section 241 of 
        this Act at any time after the issuance of a removal order;
            ``(9) it shall not be necessary to print the record or any 
        part thereof, or the briefs, and the court shall review the 
        proceedings on a typewritten record and on typewritten briefs; 
        and
            ``(10) any alien held in custody pursuant to an order of 
        removal may obtain judicial review thereof by habeas corpus 
        proceedings.
    ``(b) Notwithstanding the provisions of any other law, any alien 
against whom a final order of removal has been made heretofore or 
hereafter under the provisions of section 235 of this Act or comparable 
provisions of any prior Act may obtain judicial review of such order by 
habeas corpus proceedings and not otherwise.
    ``(c) An order of removal shall not be reviewed by any court if the 
alien has not exhausted the administrative remedies available to the 
alien as of right under the immigration laws and regulations or if the 
alien has departed from the United States after the issuance of the 
order. Every petition for review or for habeas corpus shall state 
whether the validity of the order has been upheld in any prior judicial 
proceeding, and, if so, the nature and date thereof, and the court in 
which such proceeding took place. No petition for review or for habeas 
corpus shall be entertained if the validity of the order has been 
previously determined in any civil or criminal proceeding, unless the 
petition presents grounds which the court finds could not have been 
presented in such prior proceeding, or the court finds that the remedy 
provided by such prior proceeding was inadequate or ineffective to test 
the validity of the order.
    ``(d)(1) A petition for review or for habeas corpus on behalf of an 
alien against whom a final order of removal has been issued pursuant to 
section 238(b) may challenge only--
            ``(A) whether the alien is in fact the alien described in 
        the order;
            ``(B) whether the alien is in fact an alien described in 
        section 238(b)(2);
            ``(C) whether the alien has been convicted of an aggravated 
        felony and such conviction has become final; and
            ``(D) whether the alien was afforded the procedures 
        required by section 238(b)(4).
    ``(2) No court shall have jurisdiction to review any issue other 
than an issue described in paragraph (1).''.
    (b) Effective Date.--The amendment made by subsection (a) shall 
take effect on the date of the enactment of this Act and shall apply to 
determinations pending on or after such date with respect to which--
            (1) a final administrative decision has been/not been 
        rendered as of such date; or
            (2) such a decision has been rendered but the period for 
        seeking judicial review of the decision has not expired.

SEC. 8. POST-PROCEEDING RELIEF FOR AFFECTED ALIENS.

    (a) In General.--Notwithstanding section 240(c)(6) of the 
Immigration and Nationality Act (8 U.S.C. 1229a(c)(6)) or any other 
limitation imposed by law on motions to reopen removal proceedings, the 
Secretary of Homeland Security shall establish a process (whether 
through permitting the reopening of a removal proceeding or otherwise) 
under which an alien--
            (1) who is (or was) in removal proceedings before the date 
        of the enactment of this Act (whether or not the alien has been 
        removed as of such date); and
            (2) whose eligibility for cancellation of removal has been 
        established by this Act;
may apply (or reapply) for cancellation of removal under section 
240A(a) of the Immigration and Nationality Act (8 U.S.C. 1229b(a)) as a 
beneficiary of the relief provided under this Act.
    (b) Parole.--The Secretary of Homeland Security should exercise the 
parole authority under section 212(d)(5)(A) of the Immigration and 
Nationality Act (8 U.S.C. 1182(d)(5)(A)) for the purpose of permitting 
aliens removed from the United States to participate in the process 
established under subsection (a).
Output: Keeping Families Together Act of 2005 - Amends the Illegal Immigration Reform and Immigrant Responsibility Act of 1996 (Act) to repeal the provision amending the definition of "aggravated felony," and restore provisions of law amended by such provision as if it had not been enacted, including residency-or status-related rights of an affected legal alien.

Amends the Immigration and Nationality Act to revise detention of criminal alien provisions, effective as if included in the Act.

Repeals, as if included in the Act: (1) certain provisions respecting termination of continuous presence or physical presence in the United States; and (2) the definition of "conviction."

Authorizes the Secretary of Homeland Security to admit certain lawfully admitted permanent resident aliens returning to the United States who temporarily proceeded abroad voluntarily and not under an order of deportation or removal, effective as of a specified date, as if certain sections of the Antiterrorism and Effective Death Penalty Act of 1996 and the Illegal Immigration Reform and Immigrant Responsibility Act of 1996 had not been enacted.

Revises provisions respecting judicial review of removal orders.

Requires the Secretary to establish a post-proceeding removal relief process for affected aliens.