The history of Thailand begins with Bronze and Iron Age sites such as Ban Chiang, occupied by about 1500 BCE. In the first millennium the region was held by Mon, Lawa, Khmer and Malay communities. Kra-Dai-speaking Tai groups moved from South China into Mainland Southeast Asia between the 8th and 10th centuries, and in greater numbers in the 13th under pressure from the Mongol armies in China. They settled in the north and in central city-states such as Lavo, mixed with the existing population, and took up the Dvaravati culture of the Chao Phraya Basin.

In Northern Thailand, the oldest region, the main ethnic group, the Tai-Yuan, founded kingdoms of their own, the semi-legendary Singhanavati (691 BCE–638 CE) and then Ngoenyang (638–1292). Sukhothai was taken in 1238 and became the capital of the Sukhothai Kingdom (1238–1438), which by the 13th century had replaced the Mon kingdoms in Central Thailand; how far the town had stood under Angkorian authority before that, and how the events of 1238 should be read, are both disputed. Suphannabhum princes separated Lavo from the Khmer Empire. Under Ramkhamhaeng the Thai script was created in 1283, the arts flourished, Thai institutions took shape, and the people called themselves Thai as those free of foreign rule. In 1351 the Suphannabhum city-state, modern Suphan Buri, and Lavo, modern Lop Buri, merged into the Ayutthaya Kingdom on the Chao Phraya River, joining Tai-Yuan of the north with Monic people of the basin. Duarte Fernandes reached Ayutthaya in 1511, the first European to do so. Its government was at first bilingual in Thai and Khmer, but Thai became the lingua franca after the Fall of Angkor in 1431 and the conquest of Sukhothai in 1438.

Siam and Burma fought 26 wars between the 16th and the early 19th century. Ayutthaya fell when its capital was sacked in the Burmese–Siamese War (1765–1767). Taksin drove out the Burmese, reunified the five warring regional states and founded the short-lived Thonburi Kingdom in 1767. He was deposed by his commander Chao Phraya Chakri, who founded the Rattanakosin Kingdom (1782–1932); at its greatest extent in 1805–1812 it took in 25 polities, among them modern Cambodia, Laos, northern Malaysia and eastern Burma. King Mongkut (Rama IV) took up Western innovations and began the modernization of the country. Thailand was the only state in Southeast Asia to stay independent through the European colonization of 1511 to 1984. Several things account for it: the centralizing reforms of Chulalongkorn, a policy that balanced British against French interests, the king's visits to Europe in 1897 and 1907, large territorial concessions to French Indochina, and the wish of both powers to keep Siam as a buffer state between their colonies. An edict of 1874 began the reforms that abolished slavery in 1905.

Siam allied with the United Kingdom in 1917 and joined the Allies of World War I. The Siamese revolution of 1932 ended absolute monarchy and made Prajadhipok (Rama VII) a constitutional king, and in 1939 the country was renamed Thailand, "Land of the Free". The Franco-Thai War of 1940–1941 gained disputed territory in Cambodia and Laos from French Indochina. Thailand was neutral at the start of World War II but joined the Axis after the Japanese invasion of Thailand on 8 December 1941, annexing disputed territory in Burma (Saharat Thai Doem) and Malaya (Sirat Malai); it gave these up after the war, with all wartime claims, in return for admission to the United Nations and American aid.David Porter Chandler and David Joel Steinberg eds. In Search of Southeast Asia: A Modern History. p. 388 In the 70-year reign of Bhumibol Adulyadej the country had 10 coups with military governments and 17 constitutions. From 1962 it allowed the United States the use of bases in the Vietnam War and sent troops to South Vietnam, and the Thai government defeated the insurgency begun by the CPT in 1965 by 1973. Thailand was a founding member of ASEAN in 1967. The 1970s peasant revolts in Thailand, to reduce farmers' debt and secure fair rice prices, brought the Land Rent Control Act (LRCA) of December 1974. Growth was rapid from 1993 to 1997, until the 1997 Asian financial crisis brought bankruptcies and unemployment, followed by recovery in 1998 and 1999. The Senate was first elected in 2000. The Sappaya-Sapasathan, the world's largest parliamentary building, opened on 1 May 2021.

Etymology The name Siam ( ) may have originated from Pali (suvaṇṇabhūmi, "land of gold"), Sanskrit श्याम (śyāma, "dark"), or Mon ရာမည (rhmañña, "stranger"), with likely the same root as Shan and Ahom. The Thai country name has mostly been Mueang Thai. Chinese records of the 13th and 14th centuries call the polities of the lower Chao Phraya Xiān (). After Xiān and Luó hú (Lavo) were joined in 1349 the compound Xiānluó hú () appears, later shortened to Xiānluó (). That form is still the Mandarin name for Siam. Yoneo Ishii argued that Xiān named several port polities of the Bay of Bangkok rather than a single place.

An earlier form, syam, occurs in a mid-11th-century Cham inscription and in 13th-century Khmer inscriptions, and Theodore Pigeaud identified the syangka of the Old Javanese Deśawarṇana with it. The country's designation as Siam by Westerners likely came from the Portuguese. Portuguese chronicles noted that Borommatrailokkanat, king of Ayutthaya, sent an expedition to the Malacca Sultanate, at the southern tip of the Malay Peninsula, in 1455. Following their conquest of Malacca in 1511, the Portuguese sent a diplomatic mission to the Ayutthaya Kingdom. A century after the Portuguese mission, on 15 August 1612, The Globe, an East India Company merchantman bearing a letter from King James I, arrived in "the Road of Syam". "By the end of the 19th century, Siam had become so enshrined in geographical nomenclature that it was believed that by this name and no other would it continue to be known and styled." The country was renamed to Thailand ( ) which means “Land of the Free” in 1939. Thailand has been nicknamed the "Emerald Kingdom", the "Land of the White Elephant", the "Rice bowl of Asia", and the "Land of Smiles". The elephant is a Thai national symbol and treasure. Thailand's geographic shape resembles an elephant's head with a long trunk.

Prehistory

Mainland Southeast Asia was home to various indigenous communities for up to 100,000 years. The discovery of Homo erectus fossils such as Lampang man is an example of archaic hominids. The remains were first discovered during excavations in Lampang Province. The finds have been dated from roughly 1,000,000–500,000 years ago in the Pleistocene. Stone artefacts dating to 40,000 years ago have been recovered from, e.g., Tham Lod rockshelter in Mae Hong Son and Lang Rongrien Rockshelter in Krabi, peninsular Thailand. The archaeological data between 18,000 and 3,000 years ago primarily derive from cave and rock shelter sites, and are associated with Hoabinhian foragers.

Bronze Age There are many sites in present-day Thailand dating to the Bronze (1500–500 BCE) and Iron Ages (500 BCE–500 CE). Areas comprising what is now Thailand participated in the Maritime Jade Road, as ascertained by archeological research. The trading network existed for 3,000 years, between 2000 BC and 1000 AD.Tsang, Cheng-hwa (2000), "Recent advances in the Iron Age archaeology of Taiwan", Bulletin of the Indo-Pacific Prehistory Association, 20: 153–158, doi:10.7152/bippa.v20i0.11751Turton, M. (2021). Notes from central Taiwan: Our brother to the south. Taiwan's relations with the Philippines date back millennia, so it's a mystery that it's not the jewel in the crown of the New Southbound Policy. Taiwan Times.Everington, K. (2017). Birthplace of Austronesians is Taiwan, capital was Taitung: Scholar. Taiwan News.Bellwood, P., H. Hung, H., Lizuka, Y. (2011). Taiwan Jade in the Philippines: 3,000 Years of Trade and Long-distance Interaction. Semantic Scholar. The site of Ban Chiang (around Udon Thani Province) currently ranks as the earliest known of copper and bronze production in Southeast Asia and has been dated to around 2,000 years BCE. Baker and Pasuk place the appearance of bronze at about 1250 to 1000 BCE, while noting that others argue for 2000 to 1800 BCE. Around 1500 BCE, there was independent human cultural, social, and technological evolution in the Ban Chiang area which later spread widely over the region.

The early date rests on determinations that are themselves disputed. Sing C. Chew sets a long chronology, which puts the first bronze at about 2000 BCE, against a short one of about 1200 to 1000 BCE. Joyce White and Elizabeth Hamilton trace the technology to metalworkers of the Seima-Turbino tradition moving from the Altai through Sichuan and Yunnan, a route that avoids the Central Plain of China. Charles Higham and his colleagues bring it instead down the Yangtze to Lingnan and on to northern Vietnam and northeastern Thailand in the later second millennium BCE. They date the Ban Non Wat burials to between 1259 and 1056 cal BCE and the regional sequence to about 1600–540 BCE, and object that the older determinations come from disturbed deposits. Chew endorses neither and quotes their own remark that such models must remain in flux.

Archaeobotany has been used to test the direction of the earliest exchange. Cristina Castillo and her colleagues identified the rice grown and eaten in Thailand between about 1050 and 420 BCE as japonica rather than indica. The peninsular sites with the earliest Indian contact yielded no japonica in their Bronze Age levels, and indica appears only from the first centuries CE. Chew reads this as evidence that the exchange behind early cultivation ran to China.

Ancient history

Initial states

The oldest known records of a political entity in Indochina are attributed to Funan, located in the Mekong Delta and comprising territories inside modern-day Thailand. Chinese annals confirm Funan's existence as early as the first century CE. Archaeological documentation implies an extensive human settlement history since the fourth century BCE.

The region was inhabited by a number of indigenous Austroasiatic-speaking and Malayo-Sumbawan-speaking civilisations. By the first millennium the region was inhabited by the primary groups: the Austroasiatic Lawa in the north, Mon in the center, Khmer in the east and the Austronesian Malay in Langkasuka of the Malay Peninsula. However, literary and concrete sources about Thailand before the 13th century are scarce, and most of the knowledge about this period is gleaned from archaeological evidence. Similar to other regions in Southeast Asia, Thailand was heavily influenced by the cultures and religions of India and Sri Lanka, starting with the Funan Kingdom, around the first century, until the Khmer Empire.Thailand. History . Encyclop?dia Britannica Online These kingdoms were composed of Dvaravati, Srivijaya, and the Khmer Empire."Some Aspects of Asian History and Culture" by Upendra Thakur p.157 E. A. Voretzsch believes that Buddhism must have been flowing into Thailand from India at the time of the Indian emperor Ashoka of the Maurya Empire and into the first millennium. Later, Thailand was influenced by the south Indian Pallava dynasty and north Indian Gupta Empire.