Millions of immigrants came to the United States in the late 19th and early 20th centuries seeking economic opportunity and religious freedom. Between 1870 and 1920, approximately 20 million Europeans arrived primarily on the east coast to escape difficulties in their homelands. Smaller numbers of Chinese and Japanese immigrants also arrived, many working on railroads or in farming. While some Americans welcomed the contributions of immigrants, others feared their differing cultures and religions would threaten American identity, leading to restrictive immigration laws like the Chinese Exclusion Act of 1882.