immediately to obey and execute said judge's order; and in case he shall delay or refuse to do so shall be subject to indictment for a misdemeanor, and be punished by a fine of not less than $500 and imprisonment in the common jail for a period not less than six months, in the discretion of the court: Provided, however, That no person shall be discharged by virtue of the provisions of this act until after he or she shall have taken an oath of allegiance to the Government of the United States and to support the Constitution thereof, and that he or she will not hereafter in any way encourage or give aid and comfort to the present rebellion or the supporters therefor: And provided, also, That the judge or court before whom such person may be brought before discharging him or her from imprisonment shall have power on examination of the case and if the public safety shall require it shall be required to cause him or her to enter into recognizance with or without surety in a sum to be fixed by said judge or court to keep the peace and be of good behavior toward the United States and its citizens, and from time to time and at such times as such judge or court may direct appear before said judge or court to be further dealt with according to law as the circumstances may require. And it shall be the duty of the district attorney of the United States to attend such examination before the judge.
SEC. 3. And be it further enacted, That in case any such prisoners shall be under indictment or presentment for any offense against the laws of the United States and by existing laws bail or a recognizance be taken for the appearance for trial of such persons is shall be the duty of said judge at once to discharge such persons upon bail or recognizance for trail as aforesaid. And in case the said Secretaries of State and War shall for any reason refuse or omit to furnish the said list of persons held as prisoners as aforesaid at the time of the passage of this act within twenty days thereafter, and of hereafter may be arrested within twenty days from the time of the arrest, any citizen may after a grand jury shall have terminated its session without finding an indictment or presentment as provided in the second section of this act by a petition alleging the facts aforesaid touching any of the persons so as aforesaid imprisoned, supported by the oath of such petitioner or any other credible person, obtain and be entitled to have the said judge's order to discharge such prisoner on the same terms and conditions prescribed in the second section of this act: Provided, however, That the said judge shall to satisfied such allegations are true.
SEC. 4. And be it further enacted, That any order of the President or under his authority made at any time during the existence of the present rebellion shall be a defense in all courts to any action or prosecution, civil or criminal, pending or to be commenced for any search seizure, arrest or imprisonment made, done or committed or acts omitted to be done under or by virtue of such order, or under color of any law of Congress; and defense may be made by special plea or under the general issue.
SEC. 5. And be it further enacted, That if any suit or prosecution, civil or criminal, has been or shall be commenced in any State court against any officer, civil or military, or against any other person for any arrest or imprisonment made or other trespasses or wrongs done or committed or any act omitted to be done at any time during the present rebellion by virtue or under color of any authority derived from or exercised by or under the President of the United States or any act of Congress, and the defendant shall at the time of entering his