Cocaine and opium were legal during the 19th century, and were favored drugs among the middle and upper classes. Cocaine became illegal after it became associated with African Americans following Reconstruction. Opium was first restricted in California in 1875 when it became associated with Chinese immigrant workers.Marijuana was legal until the 1930s when it became associated with Mexicans.SD, legal in the 1950s, became illegal in 1967 when it became associated with the counterculture. By the end of the 19th century concern had grown over the indiscriminate use of these drugs, especially the addicting patent medicines.