Sri Dharmasokaraja II (), also known as Chandrabhanu I (), was a 12th-century monarch. He is attested in both epigraphic and literary sources, most notably the Pali–Old Khmer Dong Mae Nang Mueang inscription (K. 766), the , and the Legend of Phatthalung. These sources portray him as the ruler of the Phraek Si Racha–Lavo–Tambralinga polities during a period of intensified political competition between regional centers of the Chao Phraya basin and the expanding Angkor.

The reign of Sri Dharmasokaraja II is marked by a temporary assertion of authority over Lavo and the lower Menam basin in the mid-12th century, followed by the loss of Lavo under Angkorian pressure during the reign of Jayavarman VII. He then made Tambralinga his principal seat. From there the kingdom continued its religious patronage and its diplomatic relations, including tribute missions to China. His reign also saw conflicts and negotiated alliances with other dynasties of the time, which reshaped the distribution of power in southern and central Thailand before the polities that followed. He died in 1183 and was succeeded by his younger brother, Sri Dharmasokaraja III (Chandrabhanu II).

Accession and authority in Menam basin

Sri Dharmasokaraja II appears to have taken the throne of Lavo around 1157. His reign is attested most clearly in the Dong Mae Nang Mueang inscription (K. 766), dated to 1167/68, which shows his authority reaching well north of Lavo and the lower Menam basin by that year.

The northernmost limit of his recognised power lay at Dong Mae Nang Mueang (), in the present-day Banphot Phisai district of Nakhon Sawan province. The inscription records his order to a subordinate local ruler, King Sunat (), to donate rice fields for the veneration of the Buddha's relics, which shows royal authority, local rule and Buddhist patronage working together.

Narrative traditions preserved in the Legend of Phatthalung () suggest that by circa 1180 Sri Dharmasokaraja II was ruling from a city other than Nakhon Si Thammarat, potentially Lavo.

Dong Mae Nang Mueang inscription

The year of the inscription is disputed. George Cœdès read the date as 5 February 1167, taking the year as elapsed; David K. Wyatt, working from J. C. Eade's tables, made it 4 February 1168, while conceding that his own reading falls on the tenth day of the waning moon rather than the full moon the text names.

A third man appears in the text, a mahāsenāpati styled Śrī Bhuvanāditya. The presence of a paramount king and a commander-in-chief in one inscription was Cœdès's original ground for refusing it to Lopburi, which he held too subordinate to have had either.

Which polity the donor ruled from has been argued at length, and the name is part of the argument. Cœdès first proposed a king of Hariphunchai, either Ādityarāja or his successor Dhammikarāja, then withdrew the proposal in a footnote added while his article was in press, and in 1968 stated a preference for Lopburi; Wyatt follows him in that. Angkor is excluded on the name itself, no Angkorian king having taken the style Dharmāśoka.

Angkorian pressure and regional conflicts

Around the 1180s to 1190s, Sri Dharmasokaraja II appears to have lost effective control over Lavo, a development commonly attributed to increasing political and military pressure from the Angkorian king Jayavarman VII (r. 1181–1218). This intervention followed earlier attempts by Lavo to assert autonomy, including the dispatch of a tributary mission to a royal court in 1155. In the aftermath of Angkorian intervention, Jayavarman VII installed his son Nripendravarman, later enthroned as Indravarman II, as ruler of Lavo, ending Sri Dharmasokaraja II's authority there. The year in which Sri Dharmasokaraja II lost control of Lavo also appears to correspond with the emergence of a new dynasty, likely bearing dynastic connections to the Mahidharapura clan of Angkor, which conquered the Phraek Si Racha region and re-established it as Chen Li Fu.

The period saw wider population movement and dynastic realignment in the Chao Phraya basin. His years of authority at Lavo coincide with the northward movement of a Phraek Si Racha prince identified in later traditions as Pra Poa Noome Thele Seri, who migrated from Tasoo Nacora Louang or Yassouttora Nacoora Louang, potentially Lavo, toward the Sukhothai–Nakhon Thai area. Subsequent accounts record that this ruler and his brother, Uthong I, later shifted southward and established authority in the western Menam basin.

In the same year that Angkorian forces displaced him from Lavo, Sri Dharmasokaraja II is recorded to have engaged in territorial conflict with Phichaithep Chiang Saen (), a figure frequently equated with Pra Poa Noome Thele Seri, ruler of Phrip Phri, father of Uthong II of Ayodhya and his own predecessor at Lavo. Both were pressing south, perhaps as far as the country below the Kra Isthmus. The quarrel was settled by negotiation rather than a long war, and the two houses came to an alliance.

Tambralinga and succession

Following the loss of Lavo, Sri Dharmasokaraja II established Tambralinga as his chief political center. From there it kept up its diplomatic ties abroad, sending a tributary mission to China in 1168.

Sri Dharmasokaraja II died in 1183. He was succeeded by his younger brother, Sri Dharmasokaraja III, also known as Chandrabhanu II, who inherited a polity centred on Tambralinga.