King Boko temple is actually not a temple, but the ruins of the royal remains of a kingdom. For that Boko temple is also often referred to as King Baka Palace. King Boko Palace was first discovered by Dutch archaeologist, HJ De Graaf in the 17th century.
According to the Abhayagiriwihara inscription, which dates back to 714 Caka ( AD 792 ) that found around the temple site, it states that the King Baka palace was built by Rakai Panangkaran from the Buddhist Syailendra dynasty, but later taken over by Hindu Mataram kings. This led the King Boko Palace to a Hindu-Buddhist-style building.
During the reign of Rakai Walaing pu Kumbayoni, 898-908 AD, Abhayagiriwihara was renamed Karaton Walaing.