The Geary Act was a United States law that extended the Chinese Exclusion Act of 1882 by adding onerous new requirements. It was written by California Representative Thomas J. Geary and was passed by Congress on . The law required all Chinese residents of the United States to carry a resident permit, a sort of internal passport. Failure to carry the permit at all times was punishable by deportation or a year of hard labor. In addition, Chinese were not allowed to bear witness in court, and could not receive bail in habeas corpus proceedings. The Geary Act was challenged in the courts but was upheld by the United States Supreme Court in an opinion by Justice Horace Gray, Fong Yue Ting v. United States, 149 U.S. 698, 13 S. Ct. 1016. 37 L.Ed. 905 (1893), Justices David Josiah Brewer, Stephen J. Field, and Chief Justice Melville Fuller dissenting. The Chinese Exclusion Acts remained in force until partly modified by the Magnuson Act in 1943, which slightly opened up Chinese immigration and permitted naturalization. Background Chinese immigrants came to the U.S. in large numbers during the California Gold Rush and in the 1860s when the Central Pacific Railroad recruited labor to build its portion of the Transcontinental Railroad. Once gold became more scarce and labor more competitive, white hostility to the Chinese (as well as other foreign laborers) intensified in the West. This hostility eventually led to the passage of anti-Chinese immigration laws, such as the Page Act of 1875 and the Chinese Exclusion Act of 1882. The Act excluded Chinese "skilled and unskilled laborers and Chinese employed in mining" from entering the country for ten years under penalty of imprisonment and deportation, as well as denying U.S. citizenship to Chinese immigrants. The Act effectively began immigration enforcement at the border because prior to the passage of the Page Act and Chinese Exclusion Act, there existed no trained officials and interpreters, nor the bureaucratic machinery with which to enforce immigration restriction laws or an effort to document and track the movements and familial relationships of immigrants. These types of policies implemented in the Page and Chinese Exclusion Acts have largely been seen as due to what Erika Lee depicts as Government officials' deep "suspicion Chinese were attempting to enter the country under fraudulent pretenses". The Act The original Exclusion Act of 1882 only excluded Chinese laborers for a period of