The public school system was established in America in the second half of the 19th century. Up to that period, the small number of existent public schools were under local control. The first public school in the United States was opened in Boston in 1820.
Public elementary schools started to grow in number after the revolution, and by 1870 all states had them. The first compulsory education law was passed in 1851 in Massachusetts. During the restoration period that followed the revolution, public schools were segregated according to racial criteria. Public education was also extended to the children of Chinese immigrants in 1905.