The Mahavihara was one monastic fraternity among several in Sri Lanka, and it is the one whose reading of the discipline became Theravada. Richard Gombrich's social history follows the sequence. The monastery was established at Anuradhapura for Mahinda's mission in the third century before the Common Era; it preserved the Pali canon and is credited with the decision to commit it to writing during a period of famine and war, when oral transmission was at risk; and in the fifth century Buddhaghosa produced under its authority the commentaries and the Visuddhimagga that have defined Theravada doctrine ever since. Its rivals, the Abhayagiri and Jetavana fraternities, held different positions on the discipline and were open to Mahayana texts and teachers, and for long periods they were larger and better endowed. The contest was settled politically.
In the twelfth century Parakramabahu the First reunified the monastic order under Mahavihara discipline and the rival fraternities ceased to exist as separate ordination lineages. Every Theravada ordination lineage in Sri Lanka, Burma and Thailand descends from that settlement, which means a monastic argument in one Sri Lankan city determined the shape of a religion across a subcontinent.