The military history of Thailand encompasses over 1300 years of armed struggle. The Tai peoples migrated from South China and fought to settle in Southeast Asia during the 8th-10th centuries. They established city-states such as Suphannabhum in 913. Siamese served as mercenaries in the army of the Khmer King Suryavarman II in the 12th century. They lead wars of independence from the Khmer Empire and subsequently founded the kingdoms of Sukhothai (1238) and Ayutthaya (1351). Siamese conquest of Khmer territory and climate change caused the Fall of Angkor. The Siamese kingdoms had centuries of wars against the regional rival Burma until 1855. The 19th till mid-20th century had a tense standoff between the Rattanakosin Kingdom and the colonial empires of Britain and France with occasional conflicts.

Thailand's military history is dominated by its centrality in Mainland Southeast Asia, the significance of its far flung and often hostile terrain, and the changing nature of military technology. This had a decisive impact on the evolution of Thailand as a modern nation state. Thailand was involved in both world wars on different sides: a member of the Allies of World War I, but joined the Axis powers under pressure by Japan in World War II. Afterward, Thailand's military partnership with the United States culminated in a crucial role in the Cold War in Asia and as an ally in the war on terror. The Thai military's involvement in domestic politics brought frequent international attention.

Siamese under the Khmer Empire

The Tai peoples mass migrated from South China to Mainland Southeast Asia and Northern Thailand between the 8th-10th century. They gradually gained influence in the western regions of the Khmer Empire. Mercenaries from central and northern Thailand served in the army of the Khmer King Suryavarman II. He reigned from 1113 until his death in 1150. These mercenaries are evident in a bas-relief sculpture of Angkor Wat. They are called the 'Syam Kuk' () in Old Khmer. They are depicted marching eastward to battle the Chams of the Champa Kingdom (central and southern Vietnam) in the 12th century. They came from Lavo (Lopburi in central Thailand) and Syam (north-central Thailand). These were provinces (territory spheres) of the Khmer Empire.

Sukhothai period (1238–1350)

Khmer Empire declines The Siamese military state emerged from the disintegration of the Khmer Empire and the rise of Sukhothai in the 13th century. The Khmer had a powerful military state centred on what is today Cambodia. The Khmer dominated much of Mainland Southeast Asia through the use of irregular military led by captains owing personal loyalty to the Khmer warrior kings, and leading conscripted peasants levied during the dry seasons. Primarily based around its infantry, the Khmer army was typically reinforced by war elephants and later adopted ballista artillery from China.

By the end of the period, indigenous revolts amongst Khmer territories in Siam and Vietnam, and external attack from the independent kingdom of Champa, sapped Khmer strength. After the sack of the Khmer capital Angkor Wat by Champa forces in 1178–79, Khmer's ability to control its wider territories diminished rapidly. Sukhothai became an independent polity in 1238 CE. It was joined by the Ayutthaya Kingdom in 1350. The Khmer Empire was unable to repel the repeated attacks by these Siamese Kingdoms. The Khmer had a series of military setbacks which eventually caused their empire to collapse. This was followed by the Post-Angkor period in 1431.

Founding of Sukhothai Bang Klang Hao was a local leader who collaborated with Pha Mueang against Khmer authority in 1238. They successfully ousted the Khmer governor from the city-state. Bang Klang Hao was crowned as King Si Inthrathit and founded the Sukhothai Kingdom in 1238. It grew by integrating nearby Tai city-states which acknowledged the suzerainty of Sukhothai and sent tributes. Control of the Chao Phraya Basin was solidified and it became the Siamese heartland. This kingdom was ruled by the Phra Ruang Dynasty until the death of Maha Thammaracha IV and annexation by Ayutthaya in 1438.

Sukhothai expansion

Conquest of the Malay Peninsula The Malay Peninsula was conquered by the maritime Srivijaya Empire in the 7th century. Srivijaya disintegrated by raids of the Chola Empire around 1025. The Khmer Empire extended control over the Upper Malay Peninsula between the 11th and 13th century. King Ramkhamhaeng of Sukhothai (1279–1298) exploited the Khmer decline. He led the first major Siamese expansion into the Malay Peninsula by rapidly incorporating vassal states to the south. These vassals had autonomy, but paid tribute and recognized Sukhothai's authority. The Sukhothai script was created by Ramkhamhaeng in 1283. Sukhothai reached its maximum extent around 1300. The sphere of control extended north to Luang Prabang and Vientiane (in modern Laos), west to the Tenasserim coast and into the Pegu Region (modern-day Myanmar), and south along the Upper Malay Peninsula until Nakhon Si Thammarat. Sukhothai gained strategic control over maritime trade routes to India via the Andaman Sea, to China via the Gulf of Siam and the only overland route to Peninsular Malaya. They maintained positive relations with the Yuan Dynasty. This enabled economic prosperity and increased tax revenues. Theravada Buddhism moved north from Nakhon Si Thammarat. This influenced the culture, art and literature. It was later adopted as the state religion. Ramkhamhaeng's reign was a golden age and Sukhothai was a dominant power in South East Asia.

Lower Burma At the Pagan Kingdom, the new Burmese king Kyawswa controlled just a small area outside the capital. Instead, the real power rested with three former Pagan commanders of nearby Myinsaing. It was the brothers, not the nominal sovereign Kyawswa, that sent a force to retake Lower Burma in 1294 after Wareru decided to become a vassal of the Sukhothai Kingdom. Wareru drove back the Myinsaing forces.Htin Aung 1967: 79

Sukhothai–Đại Việt War (1313) Sukhothai launched an invasion against the Kingdom of Champa from the mountains. The Sukhothai army trampled through Panduranga with war elephants. Champa was a vassal state of the Kingdom of Đại Việt so Emperor Trần Anh Tông appointed General Do Thien Hu to defend Champa. Do Thien Hu lead an army from their capital Thang Long southward. The two armies of Sukhothai and Đại Việt met at the borderlands. The battle lasted several days. The Sukhothai warriors fought fiercely atop their elephants. However, the tide of war changed when Đại Việt archers shot crossbows with flaming arrows followed by Do Thein Hu's counterattack by splitting his forces to flank the Sukhothai army. The Sukhothai army was surrounded, broken and retreated westward.

Hanthawaddy–Sukhothai In the south too, the Mon-speaking Hanthawaddy kingdom based out of Martaban (now Mottama) had slowly come into its own. It formally broke away from its overlord Sukhothai in 1330. The southern kingdom's relationship with Sukhothai had always been an opportunistic arrangement from the beginning, designed to secure its rear in case of invasions from Upper Burma. In March 1298, just four years after he became a vassal of Sukhothai, when the Upper Burma ceased to be a threat, Wareru conveniently asked for and received recognition directly from the Mongol emperor as governor even though Sukhothai itself was already a vassal of the Mongols.Htin Aung 1967: 73–75 Indeed, when Sukhothai grew weaker, Martaban seized the Tenasserim coast from Sukhothai in 1319. A decade later, Sukhothai tried to reassert control, reoccupying Tenasserim, and attacking Martaban in 1330. Martaban's defences held. It threw off any formal ties with Sukhothai.

Nonetheless, the kingdom remained fragmented into three power centres: the Irrawaddy delta in the west, Pegu in the middle and Martaban in the southeast, each with its own chief, who pledged nominal allegiance to the high king. In 1364, Martaban was seized by a usurper, forcing the king to move the capital permanently to Pegu in 1369. Martaban would be de facto independent for another 20 years until 1388/1389.The expedition likely took place in late 1547. The Hmannan chronicle (Hmannan Vol. 2 2003: 238–239) says the expedition took place in 909 ME which could be any time between 30 March 1547 and 28 March 1548. (Harvey 1925: 158) also gives only 1547. However, given that Toungoo forces fully evacuated southern Arakan only in late March 1547, Tabinshwehti likely sent the expedition c. November 1547 after the rainy season.

Collapse of Angkor The collapse of Angkor was caused by a gradual, multi-century decline. From the 13th century, Sukhothai and Ayutthaya launched frequent raids into Khmer territory which disrupted trade and security. Military campaigns by Lan Xang (now Laos) also caused Khmer to emigrate from Angkor for safety. Political collapse was caused by repeated invasions by the Ayutthaya Kingdom, culminating in the sacking of Angkor in 1431. Another key factor was dramatic climate shifts in the 14th and 15th century caused instability with alternating droughts and prolonged monsoon rains. This crippled the city's complex hydraulic systems which were essential to sustain the population, agriculture and livestock. The climate disturbances fragmented the massive irrigation systems and made it unusable.

According to the Siamese Royal chronicles of Paramanuchitchinorot, clashes occurred in 1350, around 1380, 1418 and 1431.

"In 1350/51; probably April 1350 King Ramadhipati had his son Ramesvara attack the capital of the King of the Kambujas (Angkor) and had Paramaraja (Pha-ngua) of Suphanburi advance to support him. The Kambuja capital was taken and many families were removed to the capital Ayudhya. At that time, [around 1380] the ruler of Kambuja came to attack Chonburi, to carry away families from the provinces eastwards to Chanthaburi, amounting to about six or seven thousand persons who returned [with the Cambodian armies] to Kambuja. So the King attacked Kambuja and, having captured it, returned to the capitol."[sic]

In 1353, Angkor was conquered by Siamese forces. They briefly set up a government in the city, but the Khmer regained control. The repeated attacks by Ayutthaya and other Thai kingdoms led to further destruction. The city was sacked and burned multiple times. Raids from Lan Xang in the north continued to weaken Khmer control of its provinces.

Fall and Post-Angkor

The Suphannaphum dynasty attacked Angkor in 1431. Ayutthaya forces captured and sacked the capital Angkor in 1431. According to Thai chronicles the siege of Angkor Thom lasted 7 months from 1430 and until the city was captured in 1431. Trade routes were disrupted and many residents abandoned the city. This caused the Khmer to abandon Angkor and retreat south-eastwards.

The relocation of the Khmer royal court southward marked the start of the Post-Angkor period. King Ponhea Yat is associated with moves to Basan (Srey Santhor) and later to Chaktomuk (present-day Phnom Penh).

The Post-Angkor period is described in the Cambodian Royal Chronicles and the Royal chronicles of Ayutthaya. These chronicles contain recordings of military expeditions and raids with associated dates and the names of sovereigns and warlords.

Ayutthaya period (1351–1767)

Ayutthaya–Khmer conflicts (1351–1594)