King Valagamba — also written as Vattagamani Abhaya — is one of the most consequential rulers in Sri Lankan history. His reign in the first century BCE was marked by military defeat, years of exile, a triumphant return, and a singular act of religious scholarship that shaped Theravada Buddhism worldwide: the first written recording of the Pali Tipitaka. To understand Sri Lanka's Buddhist civilisation, understanding Valagamba is essential.
Who was King Valagamba?
Valagamba was a king of the Anuradhapura period, traditionally dated to around 89–77 BCE (after his restoration). He was a member of the Sinhalese royal line and ruled from Anuradhapura, the ancient capital of the island. His reign is chronicled primarily in the Mahavamsa, the great Pali chronicle compiled by monks at the Mahavihara monastery, which remains one of the most detailed historical records of ancient South Asia.
His name is rendered in several ways across historical sources — Vattagamani, Valagamba, and Valagambahu — but all refer to the same king whose story is defined by resilience rather than conquest.
How did Valagamba lose and reclaim his throne?
Valagamba's first reign lasted only a matter of months. Around 103 BCE, a series of invasions by South Indian chiefs — the Mahavamsa names seven Tamil leaders — forced him to abandon Anuradhapura and flee into the interior of the island. For approximately fourteen years he lived in hiding, reportedly sheltered by forest monks and rural communities across the hill country and dry zone.
The chronicles record that during this period of exile, Valagamba formed a close relationship with a monk named Mahanaga of Kelaniya, and that his determination to reclaim his throne was deeply intertwined with his Buddhist faith. He is said to have vowed to build a great monastery if he succeeded.
Around 89 BCE, Valagamba rallied sufficient forces and, in a series of military campaigns, defeated the occupying chiefs one by one. He re-entered Anuradhapura and restored the Sinhalese monarchy. His second reign, which lasted around twelve years, is remembered as a period of significant religious construction and cultural consolidation.
What is Valagamba's most important historical legacy?
Without question, the most far-reaching act of Valagamba's reign was commissioning the writing down of the Pali Tipitaka — the complete scriptural canon of Theravada Buddhism. Until that point, the entire canon had been preserved exclusively through oral tradition, memorised and recited by generations of monks.
The council that carried out this work assembled at the Aluvihara Rock Temple, near present-day Matale in the Central Province. Monks transcribed the canon onto palm leaves, creating a physical record that could survive the disruptions of war, famine, and the deaths of individual scholar-monks. The Mahavamsa explains that the decision was driven by the very instability Valagamba had witnessed during his exile — a recognition that relying solely on human memory was precarious.
This written canon became the textual foundation for Theravada traditions across Sri Lanka, Myanmar, Thailand, Cambodia, and Laos. The biodiversity of Sri Lanka's ancient monastic landscape is in many ways inseparable from the monastic culture that Valagamba helped reinforce through this act.
Which monuments did Valagamba build?
True to his vow, Valagamba constructed the Abhayagiri Vihara in Anuradhapura — one of the largest and most influential monastery complexes in all of ancient Asia. The Abhayagiri Dagoba, still standing today, was dedicated to the monk Mahanaga who had sheltered him during his years of exile. At its height, the Abhayagiri complex housed thousands of monks and became a centre of Mahayana and Vajrayana learning that attracted scholars from across the Buddhist world.
The stupa tradition that Valagamba advanced at Abhayagiri set an architectural and religious template followed by rulers for centuries afterward. The site is now part of the UNESCO-listed Sacred City of Anuradhapura.
What was the political context of Valagamba's reign?
The first century BCE was a turbulent period for the Anuradhapura kingdom. Dynastic instability, droughts recorded in the chronicles, and recurring pressure from South India made sustained governance difficult. Valagamba's ability to survive fourteen years of exile and return to power speaks to both his personal tenacity and the loyalty networks he maintained — particularly among the Buddhist monastic community and rural chieftains of the interior.
His story is also significant in the broader history of ethnic and religious identity in Sri Lanka. The Mahavamsa frames his conflict with the Tamil chiefs in explicitly religious terms, casting the struggle as a defence of Buddhism on the island. Modern historians treat this framing with careful nuance, recognising that the chronicle was written by monks with institutional interests, but the underlying political history of contested royal authority is broadly accepted.
Where can travellers learn more about Valagamba in Sri Lanka?
The most direct way to connect with Valagamba's world is to visit Anuradhapura, where the Abhayagiri Dagoba and its surrounding monastery ruins remain among the most impressive archaeological sites in South Asia. The sacred city is well served by guided tours and is a full day's exploration on its own.
The Aluvihara Rock Temple near Matale, where the Pali canon was first written down, is a working monastery that visitors can enter respectfully. Its cave shrines contain murals depicting scenes from Buddhist history, including the scholarly councils of Valagamba's era.
Travellers interested in the broader sweep of ancient Sri Lankan kingship will find that Sigiriya, built by a later king, and the medieval capital at Polonnaruwa together form a compelling arc of royal ambition across several centuries. Valagamba's Anuradhapura sits at the beginning of that arc.
How does Valagamba fit into Sri Lanka's broader royal history?
Sri Lanka's ancient chronicle tradition names dozens of kings across roughly two millennia of recorded royal history, but only a handful are remembered for deeds that reshaped civilisation rather than merely defended it. Valagamba belongs in that select group, alongside Devanampiya Tissa (who received Buddhism), Dutugamunu (who unified the island), and later rulers who built the hydraulic tank systems of the dry zone.
His story — exile, faith, return, and scholarship — reads as an archetype that later court poets and chroniclers returned to repeatedly when describing ideal kingship. For visitors to Sri Lanka with an interest in history, encountering Valagamba is not a footnote. It is a gateway into understanding how a small island became, and remains, one of the world's great custodians of Theravada Buddhist culture.