The settlement of present-day Thailand began about 2,000 years ago with waves of migration from China. For many centuries, the area was characterized by minor states and scattered systems of government. Some major states did exist during this period, however, especially the Khmer Empire, which was founded in the 9th century and covered the main part of both present-day Cambodia and Thailand. The Khmer people, by the way, called the Thai Siamese, so the area was known as Siam up until the 20th century