Thailand, formerly known as Siam, and officially the Kingdom of Thailand, is a country in Southeast Asia. It is located at the centre of the Indochinese Peninsula, spanning 513,120 square kilometres (198,120 sq mi), with a population of over 66 million people. Thailand is bordered to the north by Myanmar and Laos, to the east by Laos and Cambodia, to the south by the Gulf of Thailand and Malaysia, and to the west by the Andaman Sea and the southern extremity of Myanmar. It also shares maritime borders with Vietnam in the Gulf of Thailand to the southeast, and Indonesia and India on the Andaman Sea to the southwest. Bangkok is the nation's capital and largest city. Nominally, Thailand is a constitutional monarchy and parliamentary democracy; however, in recent history, its government has experienced multiple coups and periods of military dictatorships.
Tai peoples migrated from southwestern China to mainland Southeast Asia from the 11th century; the oldest known mention of their presence in the region by the exonym Siamese dates to the 12th century. Various Indianised kingdoms such as the Mon kingdoms, Khmer Empire and Malay states ruled the region, competing with Thai states such as the Kingdoms of Ngoenyang, Sukhothai, Lan Na and Ayutthaya, which rivalled each other. Documented European contact began in 1511 with a Portuguese diplomatic mission to Ayutthaya, which became a regional power by the end of the 15th century. Ayutthaya reached its peak during cosmopolitan Narai's reign, gradually declining thereafter until being ultimately destroyed in the 1767 Burmese–Siamese War. Taksin quickly reunified the fragmented territory and established the short-lived Thonburi Kingdom. He was succeeded in 1782 by Buddha Yodfa Chulaloke, the first monarch of the current Chakri dynasty.
Throughout the era of Western imperialism in Asia, Siam remained the only nation in the region to avoid being colonized by foreign powers, although it was often forced to cede both territory and trade concessions in unequal treaties. The Siamese system of government was centralized and transformed into a modern unitary absolute monarchy in the reign of Chulalongkorn. In World War I, Siam sided with the allies, a political decision to amend the unequal treaties. Following a bloodless revolution in 1932, it became a constitutional monarchy and changed its official name to Thailand, which was a satellite of Japan in World War II. In the late 1950s, a military coup under Field Marshal Sarit Thanarat revived the monarchy's historically influential role in politics. Thailand became a major ally of the United States, and played an anti-communist role in the region as a member of the failed SEATO that was designed to block further communist gains in Southeast Asia. Apart from a brief period of parliamentary democracy in the mid-1970s, Thailand has periodically alternated between democracy and military rule. Since the 2000s, It has been caught in a bitter political conflict between supporters and opponents of Thaksin Shinawatra, which culminated in two coups, most recently in 2014 and the establishment of its current and 20th constitution and faces the ongoing 2020 Thai protests.
Thailand is a middle power in global affairs, and a founding member of ASEAN; ranking high in the Human Development Index. It has the second-largest economy in Southeast Asia, and the 20th-largest in the world by PPP. Thailand is classified as a newly industrialized economy; manufacturing, agriculture, and tourism are leading sectors of the economy.