Be it enacted by the Senate and House of Representatives of the United States of America in Congress assembled,

SECTION 1. SHORT TITLE.

This Act may be cited as the ``Habeas Corpus Restoration Act of 2006''.

SEC. 2. RESTORATION OF HABEAS CORPUS FOR THOSE DETAINED BY THE UNITED STATES.

(a) In General.--Section 2241 of title 28, United States Code, is amended by striking subsection (e).

(b) Title 10.--Section 950j of title 10, United States Code, is amended by striking subsection (b) and inserting the following:

``(b) Limited Review of Military Commission Procedures and Actions.--Except as otherwise provided in this chapter or in section 2241 of title 28 or any other habeas corpus provision, and notwithstanding any other provision of law, no court, justice, or judge shall have jurisdiction to hear or consider any claim or cause of action whatsoever, including any action pending on or filed after the date of the enactment of the Military Commissions Act of 2006, relating to the prosecution, trial, or judgment of a military commission under this chapter, including challenges to the lawfulness of procedures of military commissions under this chapter.''.

SEC. 3. EFFECTIVE DATE AND APPLICABILITY.

The amendments made by this Act shall--

(1) take effect on the date of the enactment of this Act; and

(2) apply to any case that is pending on or after the date of enactment of this Act.