During the reign of Rajaraja I (985-1014 AD), the Sailendra ruler of Sri Vijaya, Mara Vijayatunggavarman, built a Buddhist monastery (Vihara) named Chudamani Vihara at Negapatnam (Nagapattinam) in Tamil Nadu. Rajaraja I patronized this initiative by granting the village of Anaimangalam for the maintenance of the Vihara.