The Chinese came to California in large numbers during the California Gold Rush, with 40,400 being recorded as arriving from 1851–1860, and again in the 1860s, when the Central Pacific Railroad recruited large labor gangs, many on five-year contracts, to build its portion of the Transcontinental Railroad. The Chinese laborers worked out well and thousands more were recruited until the railroad's completion in 1869. Chinese labor provided the massive workforce needed to build the majority of the Central Pacific's difficult route through the Sierra Nevada mountains and across Nevada. By 1869, the ethnic Chinese population in the U.S. numbered at least 100,000. Nativist objections to Chinese immigration to the U.S. took many forms, and generally stemmed from economic and cultural tensions, as well as ethnic discrimination. Most Chinese laborers who came to the United States did so in order to send money back to China to support their families there. At the same time, they also had to repay loans to the Chinese merchants who paid their passage to North America. These financial pressures left them little choice but to work for whatever wages they could. Non-Chinese laborers often required much higher wages to support their wives and children in the United States, and also generally had a stronger political standing to bargain for higher wages. Therefore, many of the non-Chinese workers in the United States came to resent the Chinese laborers, who might squeeze them out of their jobs. Furthermore, as with most immigrant communities, many Chinese settled in their own neighborhoods, and tales spread of Chinatowns as places where large numbers of Chinese men congregated to visit prostitutes, smoke tobacco, or gamble. Some advocates of anti-Chinese legislation therefore argued that admitting Chinese into the United States lowered the cultural and moral standards of American society. Others used a more overtly racist argument for limiting immigration from East Asia, and expressed concern about the integrity of American racial composition. To address these rising social tensions, from the 1850s through the 1870s the California state government passed a series of measures aimed at Chinese residents, ranging from requiring special licenses for Chinese businesses or workers to preventing naturalization. Because anti-Chinese discrimination and efforts to stop Chinese immigration violated the 1868 Burlingame-Seward Treaty with China, the federal government was able to negate much of this legislation. The Chinese population rose from 2,716 in 1851 to 63,000 by 1871. In the decade 1861–70, 64,301 were recorded as arriving, followed by 123,201 in 1871–80 and 61,711 in 1881–1890. 77% were located in California, with the rest scattered across the West, the South, and New England.