In the face of a hostile public, and in response to hard times and legal exclusion, Chinese immigrants began to build self-reliant communities that became known, to Chinese and non-Chinese residents alike,as Chinatowns. With the completion of the railroads and the end of the gold rush, Chinese immigrants moved in increasing numbers to urban areas. There, they began to congregate in Chinese-only neighborhoods that functioned as separate, nearly independent, cities within the city.
A Chinatown served as a safe haven and second home for Chinese immigrants, a place to shop for familiar food, to worship in a traditional temple, or to catch up on the news from the old country. It also was a good place to do business: The shops and factories in a Chinatown were almost exclusively Chinese-owned, and would hire Chinese workers when many non-Chinese businesses would not. By the turn of the century, Chinatowns had sprung up in cities, from San Diego to El Paso to Connecticut, and formed a network that crossed the continent.