The Federal Chinese Exclusion Act denies entry of Chinese into the US. It is not repealed until 1943.
***
The gold rush and the building of the transcontinental railroad brought many Chinese to the US. They later settled in cities and initially took low-wage work.
Euro-American labor movements became antagonistic toward Chinese labor in the 1870s. Their lobbying efforts led to the Chinese Exclusion Act in 1882, which prevented further Chinese immigration into the US. The act was renewed in 1892 and reauthorized in 1902 until it was repealed in 1943.
The 1882 act reinforced hostility toward American residents and citizens of Chinese ancestry, and was followed by a “driving out” period comprising a series of violent incidents that forced Chinese out of many communities in the west. During this period smuggling Chinese workers into the US from Canada was common and lucrative.