A unified Thai kingdom was established in the mid-14th century. Known as Siam until 1939, Thailand is the only Southeast Asian country never to have been taken over by a European power. A bloodless revolution in 1932 led to a constitutional monarchy. In alliance with Japan during World War II, Thailand became a US treaty ally following the conflict. A military coup in September 2006 ousted then Prime Minister THAKSIN Chinnawat. The interim government held elections in December 2007 that saw the former pro-THAKSIN People's Power Party (PPP) emerge at the head of a coalition government. The anti-THAKSIN People's Alliance for Democracy (PAD) in May 2008 began street demonstrations against the new government, eventually occupying the prime minister's office in August and Bangkok's two international airports in November. The PAD ended their protests in early December 2008 following a court ruling that dissolved the ruling PPP and two other coalition parties for election violations. The Democrat Party then formed a new coalition government and ABHISIT Wetchachiwa became prime minister. In October 2008 THAKSIN went into voluntary exile to avoid imprisonment for a corruption conviction, and has since agitated his followers from abroad. THAKSIN supporters re-organized into the United Front for Democracy against Dictatorship (UDD) and rioted in April 2009, shutting down an ASEAN meeting in Phuket, and in early 2010 protested a court verdict confiscating most of THAKSIN's wealth. Since January 2004, thousands have been killed as separatists in Thailand's southern ethnic Malay-Muslim provinces increased the violence associated with their cause.
The region known as Thailand has been inhabited by humans since the Paleolithic period, about 10,000 years ago. Similar to other regions in Southeast Asia, it was heavily influenced by the culture and religions of India, starting with the kingdom of Funan around the 1st century CE.
After the fall of the Khmer Empire in the 13th century, various states thrived there, such as the various Tai, Mon, Khmer and Malay kingdoms, as seen through the numerous archaeological sites and artifacts that are scattered throughout the Siamese landscape. Prior to the 12th century however, the first Thai or Siamese state is traditionally considered to be the Buddhist kingdom of Sukhothai, which was founded in 1238.
Following the decline and fall of the Khmer empire in the 13th–14th century, the Buddhist Tai kingdoms of Sukhothai, Lanna and Lan Chang were on the ascension. However, a century later, the power of Sukhothai was overshadowed by the new kingdom of Ayutthaya, established in the mid-14th century in the lower Chao Phraya River or Menam area.
Ayutthaya's expansion centered along the Menam while in the northern valley the Lanna Kingdom and other small Tai city-states ruled the area. In 1431, the Khmer abandoned Angkor after the Ayutthaya forces invaded the city. Thailand retained a tradition of trade with its neighbouring states, from China to India, Persia and Arab lands. Ayutthaya became one of the most vibrant trading centres in Asia. European traders arrived in the 16th century, beginning with the Portuguese, followed by the French, Dutch and English.
After the fall of Ayutthaya in 1767 to the Burmese, King Taksin the Great moved the capital of Thailand to Thonburi for approximately 15 years. The current Rattanakosin era of Thai history began in 1782, following the establishment of Bangkok as capital of the Chakri dynasty under King Rama I the Great. Quarters to a third of the population of some areas of Thailand were slaves.
Despite European pressure, Thailand is the only Southeast Asian nation that has never been colonized. Two main reasons for this were that Thailand had a long succession of very able rulers in the 19th century and that it was able to exploit the rivalry and tension between French Indochina and the British Empire. As a result, the country remained a buffer state between parts of Southeast Asia that were colonized by the two powers, Great Britain and France.
Western influence nevertheless led to many reforms in the 19th century and major concessions, most notably being the loss of a large territory on the east side of the Mekong to the French and the step-by-step absorption by Britain of the Shan (Thai Yai) States (now in Burma) and the Malay Peninsula.
The losses initially included Penang and Tumasik (Singapore) and eventually culminated in the loss of four predominantly ethnic-Malay southern provinces, which later became Malaysia's four northern states, under the Anglo-Siamese Treaty of 1909.
In 1932, a bloodless revolution carried out by the Khana Ratsadon group of military and civilian officials resulted in a transition of power, when King Prajadhipok was forced to grant the people of Siam their first constitution, thereby ending centuries of absolute monarchy.
During World War II, the Empire of Japan demanded the right to move troops across Thailand to the Malayan frontier. Japan invaded the country and engaged the Thai Army for six to eight hours before Plaek Pibulsonggram ordered an armistice. Shortly thereafter Japan was granted free passage, and on December 21, 1941, Thailand and Japan signed a military alliance with a secret protocol wherein Tokyo agreed to help Thailand regain territories lost to the British and French. Subsequently, Thailand undertook to 'assist' Japan in its war against the Allies, while at the same time maintaining an active anti-Japanese resistance movement known as the Seri Thai. About 200,000 Asian labourers and 60,000 Allied POWs worked on the Thailand–Burma Death Railway.
After the war, Thailand emerged as an ally of the United States. As with many of the developing nations during the Cold War, Thailand then went through decades of political instability characterised by coups d'état as one military regime replaced another, but eventually progressed towards a stable prosperity and democracy in the 1980s.