The earliest inhabitants of what is now Thailand were hunter-gatherers. However about 4,000 BC they began farming. They grew rice. At first the farmers used stone tools but about 3,000 BC bronze was discovered. From about 500 BC the people of what is now Thailand used iron.
At first what is now Thailand was divided into small states called Meuang. By 100 AD they were practicing Theravada Buddhism. However the ancestors of modern Thais are believed to have come from southern China. They migrated to Thailand between the 10th century and the 13th century AD.
Meanwhile between the 9th century and the 13th century much of what is now Thailand was ruled by the Khmers, a people from what is now Cambodia. However in the 13th century several small states in Thailand in the Mekong River valley united to form a kingdom called Sukhothai. It is regarded as the first Thai kingdom. However the first Thai kingdom did not last long. It declined in the late 14th century.
Meanwhile during the 14th century another kingdom arose in Thailand called Ayuthaya and it annexed the kingdom of Sukhothai. During the 15th century the Kingdom of Ayuthaya continued to grow.
The first Europeans to reach Thailand were the Portuguese in 1511. They were followed by the Dutch in 1605, the English in 1612 and the French in 1662.
In 1675 a Greek called Constantine Phaulkon became an official at the court in Thailand. He permitted the French to station soldiers in Thailand. However he was removed from power in 1688 and the French were expelled. Afterwards Thailand adopted an isolationist policy. The Thais cut contact with Europe until the early 19th century.
In 1765 the Burmese invaded Ayuthaya and they captured the capital in 1767 and destroyed it. However in 1769 a general named Phraya Taksin became king and he made a new capital at Thoburi across the river from Bangkok. He also built up an empire. He conquered much of Laos and other parts of Southeast Asia. However King Taksin began