During the reign of king Vatta Gamini Abhaya (Valagamba, 104 BCE, 88–76 BCE), the sangha of the country had divided into three rival orders—the Theravada orders of the Mahavihara, Abhayagiri vihāra and Dakkhina vihara. One of Parākramabāhu's ambitions was the reunification of these groups into one order, as had existed at the time of Dutugamunu. Furthermore, much of the sangha had become corrupted over the years, with bhikkhus marrying and having children, and in many cases behaving much like upāsakas in their pursuit of worldly gain.