A large number of Chinese immigrants entered the western U.S. in the second half of the nineteenth century. They came mainly to work on railroads: the few pennies per day they were paid was much more than they could have earned in China. Cengages's history book states:
As many as 300,000 Chinese immigrants arrived in the United States between 1851 and 1882, and more than 200,000 Japanese immigrants journeyed to Hawaii and the western continental United States between 1891 and 1907. They contributed in major ways to the development of two of the West's major industries: railroad building and commercial agriculture.
But different cultures do not always easily mix. Although the vast majority of Chinese, Blacks, and Whites developed cooperation and mutual respect as they lived in pioneer towns together, sometimes there were frictions. Professor Ferenc Szasz at the University of New Mexico writes that
Famed Methodist itinerant John "Father" Dyer reportedly staved off an 1880 anti-Chinese riot in the mining town of Breckenridge, Colorado. When an angry mob began to shout, "The Chinese must go," Dyer mounted the nearest steps and began to sing "All Hail the Power of Jesus' Name." He paused after several verses to launch into an extemporaneous sermon, preaching that God's love was intended for all humanity and that all men were brothers. Eventually the mob dispersed.
The pastors, priests, and preachers of the western U.S. worked to create a social harmony in which all races could live and work together.