The first recorded Chinese immigration into San Francisco was in 1848, but it began in earnest in 1852 when 18,000 arrived in a town with a then population of fewer than 37,000. The Chinese were valued as cheap labor in the building of the railroads and in agriculture. In 1870, 90% of the agricutural labor in California was Chinese. With the completion of the Union Pacific Railroad, thousands of Chinese were left unemployed while at the same time white immigration into California was increasing. Anti-Chinese feeling, expressed as boycotts, "queue" ordinances and anti-alien land ownership laws, became common. A treaty arrangement with China had been re-negotiated by The Hayes Administration in 1881. Congress was responsive to complaints from California, where most Chinese immigrants had settled. Under the terms of the initial exclusion bill, Chinese workers were to be prohibited from entering the United States for a period of 20 years and no Chinese could be granted American citizenship. Chester Arthur vetoed the measure, arguing that it violated the terms of the nation’s commercial arrangement with China. Congress was unable to override the veto and flags in San Francisco were flown at half staff. The bill was later amended to prohibiting immigration for a period of 10 years and was signed by the president. (In 1892, this act was extended for an additional 10 years.) This measure was a sharp departure from America’s traditional policy of open immigration (as in the Burlingame Treaty of 1868) and was the first to single out a particular ethnic group for special treatment. Later in 1882, Congress passed an Immigration Act that placed a total ban on the entrance of criminals, paupers and the insane.