As the mines flourished in the late 1840's and beyond, immigrants from France, Mexico, Chile, and China came to try their luck. The stiff competition prompted many white miners to take up the call of "California for Americans."

With both major political parties jockeying for control of California, the large number of American miners became a political force and their complaints of foreign competition prompted legal action. In 1850, the Foreign Miners License tax law was passed requiring all non-native born workers to pay for their right to mine at the exorbitant rate of twenty dollars per month. Foreigners who had come to mine but couldn't afford the license wound up destitute in cities such as San Francisco and so the bill was repealed--only to be replaced by an amended version in 1852 that charged the more economical rate of three dollars a month.

As other industries moved West and began looking for laborers, many Chinese left the mines. One of the largest employers of Chinese laborers was the Central Pacific Railroad. As a 1909 study on Chinese immigration notes:

A farther lease of life was undoubtedly given to the coolie error by the importation of several thousand Chinese laborers by the Pacific Railroads in 1868 and 1869. In order to complete the roads in the time required by Congress, a very large force of laborers was needed; since very few white men were to be had at any price the Central Pacific sent an agent to China, who engaged several thousand Chinamen there and prepaid their passages and other expenses. Each Chinaman signed a promissory note for $75 in gold coin, payable on demand, secured by the endorsement of friends in China and agreed to repay it in regular installments for seven months, from a guaranteed wage of $35 per month. Every laborer was free to go home as soon as his debt was paid.

Tensions between racial groups fluctuated and reflected the California economy which often oscillated between great prosperity and depressions. Competition for jobs increased when the railroad was completed and 10,000 men (9,000 of which were Chinese) were released. Then, in 1873 the Eastern Panic prompted a number of Americans to emigrate West in search of a better way of life. Racial conflict came to a climax in July 1877 when whites targeted Chinese laborers during a three-day riot in San Francisco.

With increased episodes of racial violence and louder complaints from white labor organizations, politicians sought a way to deal with competition brought on by Chinese laborers (who, not surprisingly, were not citizens and therefore, did not have any influence on the politicians of the day). The most feasible solution, it seemed to many, was an exclusion of Chinese laborers coming to America.