Tambralinga or Ho-ling was an Indianised kingdom located on the Malay Peninsula (primarily in modern-day Southern Thailand), existing at least from the 2nd to 13th centuries CE. The ethnicity of the kingdom is not known with any certainty, though it may have had Austronesian, Khmer, or Mon associations. It was possibly under the influence of Srivijaya for some time, but it later became independent from it or their relationship may have generally been that of allies rather than conqueror and vassal. The name had been forgotten until scholars recognized Tambralinga as Nakhon Si Thammarat (Nagara Sri Dharmaraja). In Sanskrit and Prakrit, tām(b)ra means "copper", "copper-coloured" or "red" and linga means "symbol" or "creation", typically representing the divine energy of Shiva.

Tambralinga first sent an embassy to China under the Song dynasty in 1001. In the 12th century it may or may not have been under the suzerainty of the Burmese Pagan Kingdom and a kingdom of Sri Lanka. At its height in the mid-13th century, under King Chandrabhanu, Tambralinga was independent, regrouping and consolidating its power and even invading Sri Lanka. By the end of the 13th century, Tambralinga was recorded in Siamese history as Nakhon Si Thammarat, under the suzerainty of the Tai Sukhothai Kingdom.

Location In his 13th-century work Zhu Fan Zhi, Chinese historian Zhao Rugua mentions the state Danmaling (Tan-ma-ling, ), describing it as a vassal of Srivijaya. The same work lists Tambralinga among the dependencies of Angkor for 1225. The History of Song gives a similar account under the name Tan-mei-liu. Briggs, in a study whose subject is the reach of the Khmer Empire over the peninsula, read that notice together with the Ling-wai-tai ta as evidence of dependency. On his account Tambralinga was a dependency of the Khmer Empire throughout the reign of Jayavarman VII (r.1181–1218). David K. Wyatt distrusts that notice, observing that he cannot see how Angkor might have controlled Tambralinga in that year without also controlling Grahi (Chaiya in modern Surat Thani province), and that Chinese compilations of the kind sometimes copied earlier writers uncritically. He also surveyed the sixteen dated inscriptions of 1168 to 1219. Those from Grahi show no indication of Angkorian political or administrative power, though he added that such an absence is not conclusive. Whether Danmaling can be identified with Tambralinga is dubious; sinologist proposes instead to locate it in the Tembeling region of Pahang.

An indigenous source of Tambralinga history is an inscription dating to 1183, written in Old Khmer, engraved on the base of a bronze Buddha statue found at Wat Hua Wiang in Chaiya District, Surat Thani Province. It gives an impression of the political situation of Tambralinga in the late-twelfth century. Michael Vickery read the Khmer documents of the Phatthalung and Nakhon Si Thammarat region as evidence that the language was still spoken there. They are grants of land and slaves rather than religious texts, and they are not in the standard Khmer of Cambodia and Ayutthaya, either in language or in script, but in a form peculiar to the peninsula. He also held that the peninsula was probably not yet Thai-speaking in the 13th century, citing Anthony Diller's estimate that Thai speakers had been there somewhat over 500 years. On Prasert na Nagara's revision of that figure to about 700 years, Thai settlement would still only begin at the end of the 13th century. Another important source is a Sanskrit inscription ascribed to King Chandrabhanu of Tambralinga, dated 1230. It gives the king the epithet "Śrī Dharmarāja", which is considered a piece of evidence for the identification of Tambralinga with Nakhon Si Thammarat (Nagara Śrī Dharmarāja in Sanskrit).

History Early coastal polities: 5th century BCE – 5th century CE Present-day peninsular Thailand has long been considered an important area in social interaction as the gateway between the South China Sea and the India Ocean since the protohistoric period (c. 500 BCE–500 CE). Hermann Kulke (1990) suggests that complex pre-Indianized political entities in present-day peninsular Thailand existed before the first millennium CE and developed into centralized polities around the mid-first millennium CE through Indianization, by adopting Indic ideologies to extend power as well as institutionalizing god-king status and dynamic traditions. Tambralinga was one of the significant centralized polities in the area that was mentioned by Indian literature of the 2nd century CE. The Tamali of the Pali Mahā Niddesa has been linked to Tambraliṅga on the eastern shore of the peninsula, a designation that may have embraced a stretch of coast including Chaiya and Chumphon rather than a single settlement. Scholars have assumed that Tambralinga was situated near modern Nakhon Si Thammarat (Ligor). The identification appears valid on the text of inscription No. 28, found in Phra Maha That temple at the center of modern Nakhon Si Thammarat. It is engraved with Pallava scripts in Sanskrit language and dated to the 5th century CE, and mentions the Tambralingeshvra meaning the "Siva of Tambralinga" or "Lord of Tambralinga".

However, some scholars who place more emphasis on Chinese records than local inscriptions are inclined to believe that the beginning of Tambralinga as an autonomous polity dates to the 10th or 11th century instead. On that view it was overshadowed before then by Pan Pan, centered on the area around the Bay of Bandon in present-day Surat Thani province.

The region was first under the domination of Funan and then of Chenla from the beginning of the 3rd century until it was conquered by Srivijaya in the latter part of the 8th.

Early mandalas: 5th – 10th centuries CE The Chinese Songhuiyaogao chronicle mentions a country named Danliumei (Tan-liu-mei), including many details during the period from 970 to 1070. It gives the impression that the kingdom was an independent state at that time, sending embassies to the court of China under the Song dynasty in 1001, 1016 and 1070. Danliumei is assumed to be a Chinese rendering of Tambralinga, though the location of Danliumei is not precisely described by the chronicles. The chronicle of Ma Duanlin and the Songshi, mention similarly named states, Zhoumeiliu (Chou-mei-liu) and Danmeiliu (Tan-liu-mei) respectively, that are also reported to have sent their first mission to China in 1001, which makes it likely that they refer to the same state.

In this era, Tambralinga consisted of five main mandalas located on the bank of Khlong Tha Khwai, Khlong Tha Chieo – Tha Thon, Khlong Tha Lat, Maying River, and the largest one on the Haad Sai Keao dune, which was speculated to be the center of Tambralinga. Each of these mandalas was formed by several communities in the surrounding area with the shrine of the most sacred site as the center and connected with other mandalas by waterways and land paths. Vaishnavism was the predominant belief system, unlike the Dvaravati culture in central Thailand and the Korat plateau where Hinayana Buddhism was dominant. Two stone images from the Surat Thani end of this coast illustrate the point. A standing four-armed Viṣṇu 1.31 m high, of about the late 6th or early 7th century and now in the Bangkok National Museum (KKH 13), is generally attributed to Wiang Sa, although it was first recorded among the Chantharakasem Palace collections at Ayutthaya rather than in the field. A smaller head 15 cm high from Wat Phra Phikanet in Tha Chana district, usually identified as Viṣṇu and now in the Chaiya National Museum, was dated to the 7th century by Piriya Krairiksh and to the late 7th or early 8th by . Both belong to the standing, four-armed, mitre-crowned type that had become the standard form for Viṣṇu across much of mainland Southeast Asia by the 7th century. The kings of Tambralinga were institutionalized as Siva-king but the king's power was probably shared by administrative subordinates and his relatives.

The region began receiving the immigrants of the Mon people around the 7th century. According to the legend of Nakhon Si Thammarat, Phraya Sri Thammasokaraj or Norabadi (; ) came from the Mon Hanthawaddy. He and his younger brother Dharanont () brought their relatives and 30,000 soldiers, along with two Monks Phra Phutthakhamphien () and Phra Phutthasakon (), south to settle in Khao Chawa Prab () in present-day Krabi Province and later relocated to establish Nakhon Si Thammarat.

Golden age: 10th – mid 13th centuries North expansion: 10th – 11th centuries During the 10th–11th centuries Tambralinga gained independence from Srivijaya by the liberation of King Sujita. It was then strong politically and economically, sending several missions to the Chinese court and even supporting troops to conquer the Lavo Kingdom as well as seizing the throne of the Angkor, two of the great mandalas in that period.

The origin of Sujita (Jivakas) of Angkor remains unclear. Cœdès interprets the term “Jivakas” to mean Javanese (Javaka), possibly indicating the king’s lineage as a native Javanese-Malay descended from the Srivijaya dynasty centered on Java. Meanwhile, Pierre Dupont argues that Jivakas was likely of Angkorian descent, or at least his wife must have been an Angkor princess. Dupont additionally comments that to avoid the loss of Angkorian influences over Lavo in the 925–927 Tambralinga–Lavo–Haripuñjaya wars, Sujita moved the troops north to occupy Lavo before it was taken by the Mon Haripuñjaya. However, Dupont's theory is rebutted by an expert in Srivijaya Studies, Pratum Chumphengphan, who defines that the wars happened before the Angkorians exercised political power over the Menam Valley. Therefore, the conflict between “Lavo–Haripuñjaya” at that time was not yet a fight between the “Angkorian and Mon,” but rather a struggle for power between “Mon of Dvaravati” in the central and northern regions, who were relatives.

During this period, at Angkor's Yaśodharapura to the northeast, since the reign of Candravaṃśa's Jayavarman V of the Bhavapura house (r. 968–1001), the aristocratic families dominated the royal court. The throne then fell into two Tambralinga princes, Udayadityavarman I and Jayavirahvarman, who ruled Angkor from 1001–1011. That period is considered a nine-year civil war between the two brothers and Suryavarman I of the Shailendra dynasty who controlled the east and southern regions and was supported by the Bhavapura house of the overthrown king.

In contrast, according to the Prasat Khna Inscription (K.1312), some scholars believe that Narapativiravarman was Sujita, the successor king of both Tambralinga and Lavo, who gave the throne at Tambralinga to his younger brother, Udayadityavarman I, in 1001. On that reading he then launched a successful campaign to conquer Yaśodharapura and enthroned Jayavirahvarman as a new Angkorian king the following year. In the same year, Udayadityavarman I of Tambralinga/Lavo was replaced by his nephew, a usurper named Suryavarman I or Kampoch, who also allied with the house of the overthrown Angkorian king, Jayavarman V, and waged war against Jayavirahvarman to control Yaśodharapura.

Buddhism dominant: 11th–13th centuries After the Sujita dynasty's losses in the war against the Chola empire in 1026, Tambralinga was revived by Padmavamsa (), a noble clan from the north (the exact location is still disputed, either from Lavo or Inthapat Nakhon (possibly Yaśodharapura) or Hanthawaddy). The influx of people and monks from Sri Lanka was recorded, which made Buddhism the dominant belief in the kingdom.