When President Rutherford B. Hayes signed the Chinese Exclusion Treaty in 1880, he effectively reversed the open-door policy set in 1868, and placed strict limits on the number of Chinese immigrants allowed into the U.S. as well as on the number allowed to become naturalized citizens. Congress then enacted the Chinese Exclusion Act in 1882, prohibiting for ten years both immigration from China and the naturalization of Chinese immigrants already in the U.S. Aroused by the belief that low-paid Chinese workers were taking jobs away from whites, anti-Chinese violence had flared, influencing passage of the bill. 40,000 Chinese immigrants had entered the U.S. in 1881; within a year those numbers had dropped to just 23. In 1886, Seattle saw anti-Chinese violence kill five people, and parts of the city were wrecked; in the aftermath, 200 Chinese were forced to board ships bound for San Francisco. Leaders of the riot promised that within a month the city would be wiped clean of Chinese.
In the 1890 census, Chinese and Japanese racial categories were added. Two years later, the Chinese Exclusion Act was extended for an additional ten years by Congress, which also added a requirement that all Chinese workers in the United States register or face deportation.
Proportions of the 1890 census data were used as the basis for restrictive immigration policies in the 1920s.
In the 1896 Plessy v. Ferguson decision, the Supreme Court ruled that segregated, or "separate but equal," public facilities were legal.
In 1898, the Spanish American War began when the USS Maine, stationed off the coast of Cuba, sank after a mysterious explosion. In Cuba and the Philippines, America helped defeat the Spanish, adding Cuba and Puerto Rico to its territories, and annexing the Philippines, Samoa, Guam, Wake Island and Hawaii.
As a result of the Spanish American War in 1898, Puerto Ricans and other Caribbean island natives (Cubans, Dominicans), and Filipinos were added to the US population.
The San Francisco school board ordered the segregation of Asian children in the city's public schools in 1906, setting off an international crisis when Japan protested that such discrimination violated its treaty relationships with the United States.