History and legends
The history of Magul Maha Vihara possibly dates back to the period of King Kavantissa (205-161 BC) who ruled the Kingdom of Ruhuna in ancient Sri Lanka. There are evidence that suggests that the king has built this temple in the 2nd Century BC on the exact location where he married the princesses Viharamahadevi, the daughter of king Kelani Tissa. Other sources claim that King Dhatusena (463-479 AD) built this temple while many other monarchs renovated it through the centuries later. There is a stone inscription at the site of this temple that dates back to the 14th century which supports the latter view.
According to legend Viharamaha Devi, the daughter of King Kelanitissa volunteered to sacrifice herself to the sea to appease the gods who were enraged at the King for punishing an innocent monk. The princess was safely carried over the ocean waves, reaching ashore at a place near the Muhudu Maha Viharaya in Pottuvil, where the encounter between king Kavantissa and the princess took place which later led to their marriage. The legend also tells that the marriage ceremony was conducted at the premises of Magul Maha Viharaya in Lahugala, where the King had later built the temple to celebrate the auspicious event. The foundations of the Magul Maduwa where the wedding ceremony took place can still be seen at the temple premises. Magul is a word in native Sinhala language which gives the meaning wedding or auspicious.
Magul Maha Vihara had been renovated by several monarchs after its establishment. A 14th century stone inscription, located within the temple premises, reveals about a queen who also had the name Viharamaha Devi, wife of King Buvenekabahu IV of Gampola and Parakramabahu V of Gampola, who renovated and donated many acres of land to this temple. Magul Maha Viharaya is inscribed in this stone inscription as Ruhunu Maha Viharaya. Some other sources reveals that king Dappula I (661-664 AD), constructed this temple after listening to the preachings of Buddhist monks. It is speculated that around 12,000 monks inhabited the complex at some stage in history, which is evident to the largeness of the ancient temple.