King Sanjaya of Mataram (AD 732 – 746) or in complete stylized name known as Rakai Mataram Sang Ratu Sanjaya (King Sanjaya Rakai (lord) of Mataram) was the founder of Mataram Kingdom during the eighth century. His name was revealed in the AD 732 Sanskrit Canggal inscription carved in stone found at the foot of Ukir (or Wukir) hill (about 340 m (1,120 ft) high) on the southern Kedu Plain in Central Java.
Another recorded source of Sanjaya's history and his successors was found in the Balitung charter. Balitung mentioned what it is called 'the builders of keraton', starting from Rakai Mataram (Sanjaya) followed by the Maharaja Rakai Panangkaran, Panunggalan, Warak, Garung, Rakai Pikatan, Kayuwangi, Watuhumalang and Watukura (which is Balitung himself).
Sanjaya was also known as Rakai Mataram with the additional title of 'Sang Ratu Sanjaya'. The title rakai (from raka or rake meaning 'lord of') indicates any members of nobility from a king to a simple squire. The name of King Sanjaya Saga was also mentioned in the old romanticized and mythicized Sundanese manuscript of Carita Parahyangan (or Parahyangan Story) dated from later period, in which Sanjaya was portrayed as the Sundanese king hero of Galuh.
Bosch suggested that Sanjaya was the progenitor of the Sanjaya Dynasty, and there was two dynasties that ruled Central Java; the Buddhist Sailendra and the Shivaist Sanjaya dynasty. The inscription also states that Sanjaya was an ardent follower of Shaivism, The latter was forced to move eastward by Sanjaya as written in an old Chinese report, whom named Sanjaya as Chi-Yen.